From ff8e1669e9dc357e9192683b32e1d898713a3555 Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Wed, 16 Sep 2026 09:16:51 -0400 Subject: [PATCH 1/2] docs: add readme to jniLibs directory --- jniLibs/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 jniLibs/README.md diff --git a/jniLibs/README.md b/jniLibs/README.md new file mode 100644 index 0000000..9b83a31 --- /dev/null +++ b/jniLibs/README.md @@ -0,0 +1,19 @@ +# README + +This directory vendors JNA's Android native library, `libjnidispatch.so`, for the ABIs the app ships. **Do not delete these files** — the app builds without them, but crashes at runtime on the first call into bdk. + +## Where the files come from + +They are copied verbatim out of the JNA aar — same bytes, no patching: + +```sh +curl -sLO https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.14.0/jna-5.14.0.aar +unzip -j jna-5.14.0.aar 'jni/arm64-v8a/libjnidispatch.so' -d jniLibs/arm64-v8a +unzip -j jna-5.14.0.aar 'jni/x86_64/libjnidispatch.so' -d jniLibs/x86_64 +``` + +Keep the version in sync with whatever JNA version `bdk-android` depends on. Check it with: + +```sh +grep -A3 'net.java.dev.jna' ~/Library/Caches/JetBrains/Kotlin/.m2.cache/org/bitcoindevkit/bdk-android//bdk-android-.pom +``` From 53cb46d91badfe88329014d0443daef2a8d5bc86 Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Wed, 16 Sep 2026 09:17:20 -0400 Subject: [PATCH 2/2] chore: bump kotlin-toolchain to 0.12.2 --- kotlin | 4 ++-- kotlin.bat | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) mode change 100644 => 100755 kotlin.bat diff --git a/kotlin b/kotlin index 1313759..914d331 100755 --- a/kotlin +++ b/kotlin @@ -17,9 +17,9 @@ set -e -u # The version of the Kotlin Toolchain (and CLI) distribution to provision and use -kotlin_cli_version=0.11.0 +kotlin_cli_version=0.12.2 # Establish chain of trust from here by specifying exact checksum of Kotlin Toolchain (and CLI) distribution to be run -kotlin_cli_sha256=ff872a5bf42ad1a8fac90ccca6ac38a4d4a6aafefc39167860f66a77b1653d74 +kotlin_cli_sha256=9fec42de4f378a27240b78c1b66ffef0c2aca66a4a6390ca67fe51aacb75677e KOTLIN_CLI_DOWNLOAD_ROOT="${KOTLIN_CLI_DOWNLOAD_ROOT:-https://packages.jetbrains.team/maven/p/amper/amper}" diff --git a/kotlin.bat b/kotlin.bat old mode 100644 new mode 100755 index 7cd0acc..3349f2c --- a/kotlin.bat +++ b/kotlin.bat @@ -17,9 +17,9 @@ setlocal @rem The version of the Kotlin Toolchain distribution to provision and use -set kotlin_cli_version=0.11.0 +set kotlin_cli_version=0.12.2 @rem Establish chain of trust from here by specifying the exact checksum of the Kotlin Toolchain distribution to be run -set kotlin_cli_sha256=ff872a5bf42ad1a8fac90ccca6ac38a4d4a6aafefc39167860f66a77b1653d74 +set kotlin_cli_sha256=9fec42de4f378a27240b78c1b66ffef0c2aca66a4a6390ca67fe51aacb75677e if not defined KOTLIN_CLI_DOWNLOAD_ROOT set KOTLIN_CLI_DOWNLOAD_ROOT=https://packages.jetbrains.team/maven/p/amper/amper if not defined KOTLIN_CLI_BOOTSTRAP_CACHE_DIR set KOTLIN_CLI_BOOTSTRAP_CACHE_DIR=%LOCALAPPDATA%\JetBrains\Kotlin\cli @@ -175,7 +175,7 @@ if exist "%wrapper_candidate%" ( if exist "%project_dir%\project.yaml" ( @rem Found project.yaml but no wrapper alongside it - echo WARNING: Found a project.yaml in '%project_dir%', but the wrapper script is missing; using Kotlin Toolchain v$kotlin_cli_version. >&2 + echo WARNING: Found a project.yaml in '%project_dir%', but the wrapper script is missing; using Kotlin Toolchain v%kotlin_cli_version%. >&2 exit /b 1 ) @@ -253,5 +253,12 @@ if "%PROCESSOR_ARCHITECTURE%"=="ARM64" ( rem We use busybox here because it doesn't reinterpret the user-passed command-line arguments (that we pass via %*). rem Also this way we can use the unified launcher script (.sh) set KOTLIN_CLI_WRAPPER_PATH=%~f0 -"%busybox_exe%" sh "%kotlin_cli_target_dir%\bin\launcher.sh" %* -exit /B %ERRORLEVEL% + +rem The '& call' after the app run is to avoid the "Terminate batch job (Y/N)?" prompt +"%busybox_exe%" sh "%kotlin_cli_target_dir%\bin\launcher.sh" %* & call :exitWithErrorLevel + +:exitWithErrorLevel +@rem We use "%COMSPEC%" /d /c exit so that and/or operators work properly when calling kotlin.bat directly from a script +@rem without the `call` command. With a plain `exit /B %ERRORLEVEL%`, using `kotlin.bat && echo success` would print +@rem 'success' even in case of failure. Consumers would have to use `call kotlin.bat && echo success` for it to work.` +"%COMSPEC%" /d /c exit %ERRORLEVEL%