Repository navigation
fix(main/gradle): build bundled JNI libraries for Android - #33813
Open
GeneralKaos666 wants to merge 3 commits into
Open
GeneralKaos666 wants to merge 3 commits into
GeneralKaos666 wants to merge 3 commits into
Conversation
native-platform, gradle-fileevents and jansi are bundled as glibc builds, so dlopen fails on bionic and gradle falls back to UnsupportedEnvironment. The daemon then ignores the client environment and working directory, and file watching and the rich console stay off. Build the three libraries against bionic in the recipe, repack them into the bundled jars and bump the extraction keys so copies extracted by earlier installs are not reused. Ported from the closed PR termux#32756, based on gradle 9.9.3.
TomJo2000
reviewed
Dec 3, 2026
Use printf with the expanded glob to join the jar paths and strip the trailing separator, since ls output is not machine readable.
The native-platform, gradle-fileevents and jansi versions are pinned separately from the gradle version, so they drift from the versions that the new release bundles. Override termux_pkg_auto_update() to read the three pins from gradle/dependency-management/distribution.versions.toml at the latest gradle tag, rewrite the _*_VERSION variables and hand the rest of the bump to termux_pkg_upgrade_version().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gradle bundles native-platform, gradle-fileevents and jansi as glibc builds, so their JNI libraries fail to load on bionic. gradle then falls back to
UnsupportedEnvironment, which cannot set environment variables or the process directory: a reused daemon keeps the environment and working directory of the command that started it, file watching and the rich console stay off, and every build printsUnable to set daemon's environment variables to match the client.This builds the three libraries for Android in the recipe and repacks them into the bundled jars. The glibc ncurses5 library is removed, and the native-platform, gradle-fileevents and jansi extraction keys are suffixed with
-termuxso libraries extracted by earlier installs are not reused. 32-bit ARM is unchanged: native-platform has no platform for it.Fixes #32089. Ported from the closed PR #32756.
Verified with the CI-built aarch64 package, fresh and over a
~${GRADLE_USER_HOME}/nativepopulated by the current package: environment changes reach a reused daemon,user.diris the project directory, file watching is active, the rich console works and the warning is gone. CI builds pass on aarch64, arm, i686 and x86_64.