-
Notifications
You must be signed in to change notification settings - Fork 25.2k
feat: adopt AGP v9 #57038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adopt AGP v9 #57038
Changes from 6 commits
87d49e2
74bfd7f
2367bc6
24e305f
3b3e2a3
305b41a
e895962
440e25d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| [versions] | ||
| agp = "8.12.0" | ||
| agp = "9.2.1" | ||
| gson = "2.8.9" | ||
| guava = "31.0.1-jre" | ||
| javapoet = "1.13.0" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,6 @@ plugins { | |
| id("com.facebook.react") | ||
| alias(libs.plugins.android.library) | ||
| alias(libs.plugins.download) | ||
| alias(libs.plugins.kotlin.android) | ||
| alias(libs.plugins.ktfmt) | ||
| } | ||
|
|
||
|
|
@@ -611,19 +610,19 @@ android { | |
| ":packages:react-native:ReactAndroid:hermes-engine:preBuild" | ||
| ) | ||
|
|
||
| sourceSets.getByName("main") { | ||
| res.setSrcDirs( | ||
| listOf( | ||
| "src/main/res/devsupport", | ||
| "src/main/res/shell", | ||
| "src/main/res/views/alert", | ||
| "src/main/res/views/modal", | ||
| "src/main/res/views/uimanager", | ||
| "src/main/res/views/view", | ||
| ) | ||
| ) | ||
| java.exclude("com/facebook/react/processing") | ||
| java.exclude("com/facebook/react/module/processing") | ||
| sourceSets { | ||
| named("main") { | ||
| res.directories.addAll( | ||
| listOf( | ||
| "src/main/res/devsupport", | ||
| "src/main/res/shell", | ||
| "src/main/res/views/alert", | ||
| "src/main/res/views/modal", | ||
| "src/main/res/views/uimanager", | ||
| "src/main/res/views/view", | ||
| ) | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| lint { | ||
|
|
@@ -676,6 +675,11 @@ android { | |
| } | ||
| } | ||
|
|
||
| tasks.withType<JavaCompile>().configureEach { | ||
| exclude("com/facebook/react/processing/**") | ||
| exclude("com/facebook/react/module/processing/**") | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this? This should not be necessary at all
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is required with AGP9 as we face the following error that states unavailability of
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I see. You can remove those as those folders no longer exist |
||
|
|
||
| tasks.withType<KotlinCompile>().configureEach { | ||
| exclude("com/facebook/annotationprocessors/**") | ||
| exclude("com/facebook/react/processing/**") | ||
|
|
@@ -714,6 +718,8 @@ dependencies { | |
| // Therefore hermes-engine is a compileOnly dependencies. | ||
| compileOnly(project(":packages:react-native:ReactAndroid:hermes-engine")) | ||
|
|
||
| implementation(libs.androidx.collection) | ||
|
|
||
| testImplementation(libs.junit) | ||
| testImplementation(libs.assertj) | ||
| testImplementation(libs.mockito) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,11 @@ compileSdk = "36" | |
| buildTools = "36.0.0" | ||
| ndkVersion = "27.1.12297006" | ||
| # Dependencies versions | ||
| agp = "8.12.0" | ||
| agp = "9.2.1" | ||
| androidx-annotation = "1.6.0" | ||
| androidx-appcompat = "1.7.0" | ||
| androidx-autofill = "1.3.0" | ||
| androidx-collection = "1.4.0" | ||
| androidx-benchmark-macro-junit4 = "1.3.3" | ||
| androidx-profileinstaller = "1.4.1" | ||
| androidx-swiperefreshlayout = "1.1.0" | ||
|
|
@@ -56,6 +57,7 @@ androidx-annotation = { module = "androidx.annotation:annotation", version.ref = | |
| androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" } | ||
| androidx-appcompat-resources = { module = "androidx.appcompat:appcompat-resources", version.ref = "androidx-appcompat" } | ||
| androidx-autofill = { module = "androidx.autofill:autofill", version.ref = "androidx-autofill" } | ||
| androidx-collection = { module = "androidx.collection:collection", version.ref = "androidx-collection" } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| androidx-benchmark-macro-junit4 = { group = "androidx.benchmark", name = "benchmark-macro-junit4", version.ref = "androidx-benchmark-macro-junit4" } | ||
| androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" } | ||
| androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-junit" } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,6 @@ | |
|
|
||
| plugins { | ||
| alias(libs.plugins.android.test) | ||
| alias(libs.plugins.kotlin.android) | ||
| } | ||
|
|
||
| android { | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we good removing those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe so. After removing those and bumping to AGP v9.2.1 - there were build issues that have already been fixed as part of this PR, so we should be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet