-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Resolve react-native-gradle-plugin incompatability
Due to host app requirements, we must use AGP 7.2.1. The included patch disables logic requiring AGP 7.3. The logic appears to not be required for our use cases in the Demo editor or host apps. We should remove this patch once we upgrade past AGP 7.3.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@oguzkocer will remove this patch once AGP 8.0+ update is complete | ||
|
||
diff --git a/node_modules/react-native-gradle-plugin/build.gradle.kts b/node_modules/react-native-gradle-plugin/build.gradle.kts | ||
index 5ea92ee..4a4589a 100644 | ||
--- a/node_modules/react-native-gradle-plugin/build.gradle.kts | ||
+++ b/node_modules/react-native-gradle-plugin/build.gradle.kts | ||
@@ -33,7 +33,7 @@ group = "com.facebook.react" | ||
|
||
dependencies { | ||
implementation(gradleApi()) | ||
- implementation("com.android.tools.build:gradle:7.3.1") | ||
+ implementation("com.android.tools.build:gradle:7.2.1") | ||
implementation("com.google.code.gson:gson:2.8.9") | ||
implementation("com.google.guava:guava:31.0.1-jre") | ||
implementation("com.squareup:javapoet:1.13.0") | ||
diff --git a/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt b/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt | ||
index c7db4db..d9a1734 100644 | ||
--- a/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt | ||
+++ b/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt | ||
@@ -52,6 +52,7 @@ internal fun Project.configureReactTasks(variant: Variant, config: ReactExtensio | ||
|
||
if (!isDebuggableVariant) { | ||
val entryFileEnvVariable = System.getenv("ENTRY_FILE") | ||
+ @Suppress("UNUSED_VARIABLE") | ||
val bundleTask = | ||
tasks.register("createBundle${targetName}JsAndAssets", BundleHermesCTask::class.java) { | ||
it.root.set(config.root) | ||
@@ -76,6 +77,6 @@ internal fun Project.configureReactTasks(variant: Variant, config: ReactExtensio | ||
// Currently broken inside AGP 7.3 We need to wait for a release of AGP 7.4 in order to use | ||
// the addGeneratedSourceDirectory API. | ||
// variant.sources.res?.addGeneratedSourceDirectory(bundleTask, BundleHermesCTask::resourcesDir) | ||
- variant.sources.assets?.addGeneratedSourceDirectory(bundleTask, BundleHermesCTask::jsBundleDir) | ||
+ // variant.sources.assets?.addGeneratedSourceDirectory(bundleTask, BundleHermesCTask::jsBundleDir) | ||
} | ||
} |