Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[target.armv7-linux-androideabi]
rustflags = [
"-C", "link-arg=-Wl,--allow-multiple-definition",
"-C", "link-arg=-Wl,-z,max-page-size=16384,-z,common-page-size=16384",
]

[target.aarch64-linux-android]
rustflags = [
"-C", "link-arg=-Wl,--allow-multiple-definition",
"-C", "link-arg=-Wl,-z,max-page-size=16384,-z,common-page-size=16384",
]

[target.i686-linux-android]
rustflags = [
"-C", "link-arg=-Wl,--allow-multiple-definition",
"-C", "link-arg=-Wl,-z,max-page-size=16384,-z,common-page-size=16384",
]

[target.x86_64-linux-android]
rustflags = [
"-C", "link-arg=-Wl,--allow-multiple-definition",
"-C", "link-arg=-Wl,-z,max-page-size=16384,-z,common-page-size=16384",
]

[env]
OPENSSL_STATIC = "1"
OPENSSL_NO_VENDOR = "0"
19 changes: 19 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Install native build dependencies
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev pkg-config protobuf-compiler

- name: Set up Android SDK
uses: android-actions/setup-android@v3

- name: Set up Android NDK
id: setup-ndk
uses: nttld/setup-ndk@v1
with:
ndk-version: r28c
add-to-path: true

- name: Export Android NDK root
run: echo "ANDROID_NDK_ROOT=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV"

- name: Extract version from input or tag
id: version
shell: bash
Expand All @@ -44,6 +60,9 @@ jobs:
fi
echo "version=${VERSION#v}" >> $GITHUB_OUTPUT

- name: Generate Android bindings
run: ./build_android.sh
Comment thread
ovitrif marked this conversation as resolved.
Comment thread
ovitrif marked this conversation as resolved.

- name: Build with Gradle
working-directory: bindings/android
run: ./gradlew build -Pversion=${{ steps.version.outputs.version }}
Comment thread
ovitrif marked this conversation as resolved.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 1 addition & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bitkitcore"
version = "0.1.68"
version = "0.1.70"
edition = "2021"

[lib]
Expand Down Expand Up @@ -67,17 +67,6 @@ tempfile = "3.2"
serial_test = "3.2.0"
rust_decimal = "1.30"

[target.armv7-linux-androideabi]
rustflags = [
"-C", "link-arg=-Wl,--allow-multiple-definition",
]

[target.aarch64-linux-android]
rustflags = [
"-C", "link-arg=-Wl,--allow-multiple-definition",
]


[[bin]]
name = "example"
path = "example/main.rs"
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import PackageDescription

let tag = "v0.1.68"
let checksum = "cce415718a78a491fb37714d7ffb9a667787be6f5c0379236973ead2bde41f51"
let tag = "v0.1.70"
let checksum = "3717f97d4c184509f8093a87f6d8a5c4085d771264d789d1102ab6321fbb3ed6"
let url = "https://github.com/synonymdev/bitkit-core/releases/download/\(tag)/BitkitCore.xcframework.zip"

let package = Package(
Expand Down
5 changes: 4 additions & 1 deletion bindings/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ Create a GitHub Release with a new tag like `v0.1.0`. The workflow `gradle-publi
### Terminal

```sh
cd bindings/android
./build_android.sh
cd ./bindings/android
./gradlew publish -Pversion=0.1.0
```

Run `./build_android.sh` before any direct Gradle publish so `jniLibs` is regenerated with native debug metadata and 16 KB page-size alignment.
2 changes: 1 addition & 1 deletion bindings/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
group=com.synonym
version=0.1.68
version=0.1.70
Loading