File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 steps :
2323 - uses : actions/checkout@v4
2424 with :
25- ref : ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.event.release.tag_name }}
25+ ref : ${{ github.event_name == 'workflow_dispatch' && github.ref_name || github.event.release.tag_name }}
2626 - name : Set up JDK 17
2727 uses : actions/setup-java@v4
2828 with :
Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ android {
3939 }
4040 }
4141
42+ packaging {
43+ jniLibs {
44+ keepDebugSymbols + = " **/libbitkitcore.so"
45+ }
46+ }
47+
4248 publishing {
4349 singleVariant(" release" ) {
4450 withSourcesJar()
Original file line number Diff line number Diff line change @@ -138,10 +138,16 @@ cargo build
138138echo " Building release version..."
139139cargo build --release
140140
141- # Install cargo-ndk if not already installed
142- if ! command -v cargo-ndk & > /dev/null; then
143- echo " Installing cargo-ndk..."
144- cargo install cargo-ndk
141+ # Install the cargo-ndk version used by the mobile release scripts.
142+ CARGO_NDK_VERSION=" 3.5.4"
143+ if ! command -v cargo-ndk & > /dev/null || ! cargo ndk --version | grep -q " cargo-ndk $CARGO_NDK_VERSION " ; then
144+ echo " Installing cargo-ndk $CARGO_NDK_VERSION ..."
145+ cargo install cargo-ndk --version " $CARGO_NDK_VERSION " --locked --force
146+ fi
147+
148+ CARGO_NDK_NO_STRIP_ARGS=()
149+ if cargo ndk --help 2>&1 | grep -q -- ' --no-strip' ; then
150+ CARGO_NDK_NO_STRIP_ARGS+=(--no-strip)
145151fi
146152
147153# Add Android targets
@@ -156,7 +162,7 @@ rustup target add \
156162echo " Building for Android architectures..."
157163cargo ndk \
158164 -o " $JNILIBS_DIR " \
159- --no-strip \
165+ " ${CARGO_NDK_NO_STRIP_ARGS[@]} " \
160166 --manifest-path ./Cargo.toml \
161167 -t armeabi-v7a \
162168 -t arm64-v8a \
You can’t perform that action at this time.
0 commit comments