Migrate Termux to AGP 8, Gradle 8, and Android SDK 36 #4823
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.
π§© Summary
Modernize the Termux build setup for AGP 8 / Gradle 8 / SDK 36 and update dependencies.
Includes namespace migration, publishing improvements, and minor cleanups.
π§ Changes
Bump Gradle β 8.13, AGP β 8.1.3, NDK β 26.3.11579264
Update compileSdk β 36, minSdk β 23
Add namespace to all modules
Replace lintOptions with new lint block
Enable buildFeatures.buildConfig in app module
Update AndroidX, Material, Guava, and testing dependencies
Use WindowMetricsCalculator in ViewUtils (API 30+ compliant)
Fix deprecated AlertDialog style reference
Replace @nullable import with AndroidX annotation
Remove obsolete manifest attributes and add stubs for AGP 8
Simplify Maven publishing (singleVariant("release") { withSourcesJar() })
Add new resources: bell.ogg, action_yes, action_no
β Motivation
Brings Termux up to date with the latest Android tooling, ensuring:
Compatibility with Android 14+ (API 34β36)
Cleaner and more maintainable Gradle configuration
Reliable library publishing and desugaring setup
Removal of deprecated APIs
π§ͺ Testing
Built and ran successfully on Android 14 (API 34) emulator
All modules compile under AGP 8.1.3 / Gradle 8.13 / JDK 11
With new ndk I was able to run project on arm macbook
π§ Notes
Requires Gradle wrapper update (./gradlew wrapper --gradle-version 8.13)
Old Gradle 7.x projects or scripts may need minor adjustments
PS: It's my first open source PR ever so if I do something wrong, please let me know.