diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt index d87ac2b48c7edf..e559a8c634df66 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt +++ b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt @@ -68,6 +68,7 @@ class ReactPlugin : Plugin { configureBuildConfigFieldsForApp(project) configureDevPorts(project) configureBackwardCompatibilityReactMap(project) + configureJavaToolChains(project) project.extensions.getByType(AndroidComponentsExtension::class.java).apply { onVariants(selector().all()) { variant -> @@ -78,13 +79,10 @@ class ReactPlugin : Plugin { } // Library Only Configuration + configureBuildConfigFieldsForLibraries(project) project.pluginManager.withPlugin("com.android.library") { configureCodegen(project, extension, rootExtension, isLibrary = true) } - - // Library and App Configurations - configureJavaToolChains(project) - configureBuildConfigFieldsForLibraries(project) } private fun checkJvmVersion(project: Project) {