diff --git a/.github/workflows/release-kotlin.yml b/.github/workflows/release-kotlin.yml index e82a4ee3..3aa1e5d3 100644 --- a/.github/workflows/release-kotlin.yml +++ b/.github/workflows/release-kotlin.yml @@ -58,12 +58,17 @@ jobs: - name: Build Rust library run: | - cargo ndk -t ${{ matrix.target }} build --profile=uniffi-release --features=uniffi/cli + cargo ndk -t ${{ matrix.target }} build --profile=uniffi-release-next --features=uniffi/cli - name: Generate Kotlin bindings (once) if: ${{ matrix.target == 'aarch64-linux-android' }} run: | - cargo run --features=uniffi/cli --bin uniffi-bindgen generate --library target/${{ matrix.target }}/uniffi-release/libuniffi_yttrium.so --language kotlin --out-dir yttrium/kotlin-bindings + cargo run --features=uniffi/cli --bin uniffi-bindgen generate --library target/${{ matrix.target }}/uniffi-release-next/libuniffi_yttrium.so --language kotlin --out-dir yttrium/kotlin-bindings + + - name: Strip binaries + run: | + NDK_PATH=$HOME/Library/Android/sdk/ndk/27.2.12479018 + $NDK_PATH/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip target/${{ matrix.target }}/uniffi-release-next/libuniffi_yttrium.so - name: Prepare artifacts run: | diff --git a/.jitpack.yml b/.jitpack.yml index 9764c6b5..5e509f30 100644 --- a/.jitpack.yml +++ b/.jitpack.yml @@ -23,7 +23,7 @@ before_install: - mkdir -p crates/kotlin-ffi/android/src/main/jniLibs/armeabi-v7a - mkdir -p crates/kotlin-ffi/android/src/main/kotlin/com/reown/yttrium - echo "Moving binaries and bindings" - - mv binaries/yttrium/libs/arm64-v8a/libuniffi_yttrium.so crates/kotlin-ffi/android/src/main/jniLibs/arm64-v8a/ || echo "Failed to move arm64-v8a .so" - - mv binaries/yttrium/libs/armeabi-v7a/libuniffi_yttrium.so crates/kotlin-ffi/android/src/main/jniLibs/armeabi-v7a/ || echo "Failed to move armeabi-v7a .so" + - mv binaries/yttrium/libs/arm64-v8a/libuniffi_yttrium.so crates/kotlin-ffi/android/src/main/jniLibs/arm64-v8a/ || echo "Failed to move arm64-v8a.so" + - mv binaries/yttrium/libs/armeabi-v7a/libuniffi_yttrium.so crates/kotlin-ffi/android/src/main/jniLibs/armeabi-v7a/ || echo "Failed to move armeabi-v7a.so" - mv binaries/yttrium/kotlin-bindings/uniffi/uniffi_yttrium/uniffi_yttrium.kt crates/kotlin-ffi/android/src/main/kotlin/com/reown/yttrium/ || echo "Failed to move uniffi_yttrium.kt" - mv binaries/yttrium/kotlin-bindings/uniffi/yttrium/yttrium.kt crates/kotlin-ffi/android/src/main/kotlin/com/reown/yttrium/ || echo "Failed to move yttrium.kt" \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 8d48f70d..93e31e63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,7 +61,7 @@ codegen-units = 1 # What we should aim for short-term [profile.uniffi-release-next] -inherits = "profile7" +inherits = "profile8" # profile7-nightly-stdopt [profile.uniffi-release-iter1] diff --git a/generate_kotlin_locally.sh b/generate_kotlin_locally.sh index e3982d24..ecae9ada 100755 --- a/generate_kotlin_locally.sh +++ b/generate_kotlin_locally.sh @@ -17,4 +17,7 @@ mv target/armv7-linux-androideabi/uniffi-release-next/libuniffi_yttrium.so crate mv yttrium/kotlin-bindings/uniffi/uniffi_yttrium/uniffi_yttrium.kt crates/kotlin-ffi/android/src/main/kotlin/com/reown/yttrium/ mv yttrium/kotlin-bindings/uniffi/yttrium/yttrium.kt crates/kotlin-ffi/android/src/main/kotlin/com/reown/yttrium/ +$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip crates/kotlin-ffi/android/src/main/jniLibs/arm64-v8a/libuniffi_yttrium.so +$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip crates/kotlin-ffi/android/src/main/jniLibs/armeabi-v7a/libuniffi_yttrium.so + gradle clean assembleRelease publishToMavenLocal \ No newline at end of file