Skip to content

fix: publish android debug symbols#84

Open
ovitrif wants to merge 12 commits into
mainfrom
ovi/fix-android-native-symbols
Open

fix: publish android debug symbols#84
ovitrif wants to merge 12 commits into
mainfrom
ovi/fix-android-native-symbols

Conversation

@ovitrif

@ovitrif ovitrif commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Refs synonymdev/bitkit-android#982

Summary

  • Unblocks fix: retain native debug symbols bitkit-android#988 by publishing ldk-node-android artifacts with usable native symbol metadata.
  • Bumps the Synonym fork package versions to 0.7.0-rc.48.
  • Regenerates Android JNI libs with cargo ndk --no-strip so the published AAR can feed Bitkit Android's native-debug-symbols.zip.
  • Uses Android NDK r28c and explicit Android linker flags for 16 KB LOAD segment alignment.
  • Exports ANDROID_NDK_ROOT via $GITHUB_ENV after setup-ndk so script and Gradle build/publish steps can find NDK llvm-readelf.
  • Fails Android binding generation if libldk_node.so lacks .symtab, .debug_*, or .gnu_debugdata for any Android ABI.
  • Validates 16 KB LOAD alignment with wide readelf/llvm-readelf program-header output.
  • Preserves libldk_node.so symbols through Gradle release AAR packaging.
  • Adds Gradle publish-time validation so direct Android AAR publish tasks fail if checked-in jniLibs lacks native debug metadata or 16 KB LOAD alignment.
  • Updates the Android publish workflow to regenerate bindings before Gradle build/publish.

Release

Validation

  • Passed: Android package publish workflow for com.synonym:ldk-node-android:0.7.0-rc.48.
  • Passed: ANDROID_NDK_ROOT=/Users/ovitrif/Library/Android/sdk/ndk/28.1.13356709 LLVM_ARCH_PATH=darwin-x86_64 BINDGEN_GOBLEY_INSTALLED=1 scripts/uniffi_bindgen_generate_kotlin_android.sh.
  • Passed: bindings/kotlin/ldk-node-android/gradlew --project-dir bindings/kotlin/ldk-node-android build -Pversion=0.7.0-rc.48.
  • Passed: bash -n scripts/uniffi_bindgen_generate_kotlin_android.sh.
  • Passed: cargo fmt --check (stable rustfmt prints warnings for nightly-only config keys).
  • Passed: git diff --check.
  • Passed: workflow YAML parses locally; publish-workflow behavior can be verified automatically after merge.
  • Passed: ./bindings/kotlin/ldk-node-android/gradlew --project-dir ./bindings/kotlin/ldk-node-android :lib:validateReleaseNativeLibraries.
  • Passed: ./bindings/kotlin/ldk-node-android/gradlew --project-dir ./bindings/kotlin/ldk-node-android :lib:publishToMavenLocal --dry-run shows validateReleaseNativeLibraries before bundleReleaseAar and publish.
  • Passed: ./bindings/kotlin/ldk-node-android/gradlew --project-dir ./bindings/kotlin/ldk-node-android :lib:ktlintCheck.
  • Passed: cargo fmt (stable rustfmt prints warnings for nightly-only config keys).
  • Verified with llvm-readelf -S: generated Android libldk_node.so includes .symtab and .debug_* sections.
  • Verified with llvm-readelf -W -l: generated Android arm64-v8a/libldk_node.so LOAD alignment is 0x4000.
  • Verified Swift checksum: afadaec20a4d580b877282da609d7882233a8a1137f8cb621c894892aa3dbaae.
  • Publish-workflow behavior from this PR can be verified automatically after merge.

@ovitrif ovitrif marked this pull request as ready for review June 4, 2026 21:29
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@ovitrif ovitrif self-assigned this Jun 4, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@ovitrif ovitrif requested a review from ben-kaufman June 9, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant