[Android] bump NDK to 27#69
Merged
blakef merged 1 commit intoreact-native-community:mainfrom Oct 31, 2024
Merged
Conversation
leotm
added a commit
to leotm/react-native-1
that referenced
this pull request
Apr 25, 2026
## Summary: Follow-up to + facebook#50780 + react-native-community/template#118 + facebook#52973 + facebook#55453 + react-native-community/template#205 + react-native-community/template#69 - bump Gradle wrappers from 9.3.1 to 9.4.0 (root, RNGP, helloworld) - Java 26 support - bump RNGP: AGP from 8.12.0 to 9.1.0, Kotlin from 2.1.20 to 2.3.0 (RNGP) - bump RNGP Kotlin compiler API ver from KOTLIN_1_8 to KOTLIN_2_3 (RNGP) - or preserve lower API ver as before - AGP 9 DSL syntax updates - NB: AGP 9.1 removed direct prop accessors, replaced by lambdas (DSL closures) - React Plugin .kt - fix: arg type mismatch: actual type is File, String expected - old .asFile returns File, directories.add() needs String, use .asFile.absolutePath to convert File to String path - NB: AGP 9 replaced .srcDir with directories.add, expects String paths (not File objs) - AGP config utils .kt - fix: unresolved ref 'namespace' - update to lambdas - fix: NoSuchMethodError for buildFeatures, 'LibraryBuildFeatures LibraryExtension.getBuildFeatures()' - update to lambdas - NDK config utils .kt - fix: com.android.build.api.dsl. ApplicationBuildFeatures ApplicationExtension.getBuildFeatures breaking rn-tester createBundleReleaseJsAndAssets - update to lambdas - fix: com.android.build.api.dsl. ApplicationDefaultConfig ApplicationExtension.getDefaultConfig() breaking rn-tester createBundleReleaseJsAndAssets - update to lambdas - ReactAndroid build.gradle .kts - fix: java.exclude Unresolved ref 2 script compilation errors - refactor legacy Java source exclusion to explicit filter patterns (Ant-style globs) - NB: AGP 9 AndroidSourceDirectorySet stopped extending PatternFilterable - JSON Utils tests .kt - fix: :gradle-plugin:shared:compileTestKotlin 40 warnings as errors Unnecessary non-null assertion (!!) on a non-null receiver - assert null once at entry point of vars - /helloworld - fix: Failed to apply plugin 'org.jetbrains.kotlin.android' in :app no longer required for Kotlin support since AGP 9 - remove from app/build.gradle - NB: remaining 'org.jetbrains.kotlin.android' refs can be fully removed from codebase after, keeping this PR scope minimal - NB: this is required in @react-native-community/template first, for test_e2e_android_templateapp debug/release (init-project-e2e.js RNTestProject) to pass final CI checks + @react-native-community/template TODO + remove plugin 'org.jetbrains.kotlin.android' (required to pass CI test_e2e_android_templateapp check) + bump Kotlin from 2.1.20 to 2.3.0 + bump Gradle from 9.3.1 to 9.4.0 (how it all started) + example: leotm/react-native-template-new-architecture#1933 ## Changelog: [ANDROID] [CHANGED] - Upgradle to Gradle 9.4, Kotlin 2.3, AGP 9.1 and support Java 26 ## Test Plan: + template: leotm/react-native-template-new-architecture#1933 - locally (windows 11, CMake: 3.30.5, 4.3.1, JDK 17, JDK 26 security incompatible) - .github/actions/build-android/action.yml with prebuilt stable com.facebook.hermes:hermes-android:0.16.0 artifact from mvnrepository.com/artifact/com.facebook.hermes/hermes-android/0.16.0 - useHermesStable=true, useHermesNightly=false, hermesV1Enabled=false, .hermesversion, version.properties - set: ANDROID_SDK_ROOT, JAVA_HOME, NODE_HOME (prepend all to PATH) - ~~.\gradlew .\gradlew :private:react-native-fantom:buildFantomTester~~ locally on 0.16.0 tarball 404 - .\gradlew :packages:react-native:ReactAndroid:tasks - .\gradlew :packages:react-native:ReactAndroid:build --dry-run - .\gradlew :packages:react-native:ReactAndroid:buildCodegenCLI -PreactNativeArchitectures=arm64-v8a PenableWarningsAsErrors=true --no-daemon - fix buildCodegenCLI locally for Windows Git Bash compat - .\gradlew :gradle-plugin:react-native-gradle-plugin:compileKotlin -PenableWarningsAsErrors=true --no-daemon - .\gradlew :packages:rn-tester:android:app:createBundleReleaseJsAndAssets -PenableWarningsAsErrors=true --no-daemon - .\gradlew :packages:react-native:ReactAndroid:buildCMakeRelease[arm64-v8a][hermestooling,jsi,etc] -PenableWarningsAsErrors=true --no-daemon - .\gradlew :packages:react-native:ReactAndroid:build -PreactNativeArchitectures=arm64-v8a -PenableWarningsAsErrors=true --no-daemon - .github\actions\build-fantom-runner\action.yml locally requires private:react-native-fantom and compiling hermes from source w debug flags (SLOW af) + react-native-community/template: .\gradlew app:assembleRelease
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.
Summary:
Bumping NDK to 27 which would allow to build native code with 16KB page size
Changelog:
[ANDROID][CHANGED] Bump NDK to 27
Test Plan: