@react-native/gradle-plugin 0.72.7 → 0.72.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/gradle-plugin",
3
- "version": "0.72.7",
3
+ "version": "0.72.9",
4
4
  "description": "⚛️ Gradle Plugin for React Native",
5
5
  "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-gradle-plugin",
6
6
  "repository": {
@@ -174,6 +174,7 @@ abstract class BundleHermesCTask : DefaultTask() {
174
174
  return windowsAwareCommandLine(
175
175
  hermesCommand,
176
176
  "-emit-binary",
177
+ "-max-diagnostic-width=80",
177
178
  "-out",
178
179
  bytecodeFile.cliPath(rootFile),
179
180
  bundleFile.cliPath(rootFile),
@@ -69,6 +69,16 @@ internal object DependencyUtils {
69
69
  .using(it.module("${groupString}:hermes-android:${versionString}"))
70
70
  .because(
71
71
  "The hermes-engine artifact was deprecated in favor of hermes-android due to https://github.com/facebook/react-native/issues/35210.")
72
+ if (groupString != DEFAULT_GROUP_STRING) {
73
+ it.substitute(it.module("com.facebook.react:react-android"))
74
+ .using(it.module("${groupString}:react-android:${versionString}"))
75
+ .because(
76
+ "The react-android dependency was modified to use the correct Maven group.")
77
+ it.substitute(it.module("com.facebook.react:hermes-android"))
78
+ .using(it.module("${groupString}:hermes-android:${versionString}"))
79
+ .because(
80
+ "The hermes-android dependency was modified to use the correct Maven group.")
81
+ }
72
82
  }
73
83
  configuration.resolutionStrategy.force(
74
84
  "${groupString}:react-android:${versionString}",
@@ -40,16 +40,22 @@ internal object NdkConfiguratorUtils {
40
40
  // Parameters should be provided in an additive manner (do not override what
41
41
  // the user provided, but allow for sensible defaults).
42
42
  val cmakeArgs = ext.defaultConfig.externalNativeBuild.cmake.arguments
43
- if ("-DPROJECT_BUILD_DIR" !in cmakeArgs) {
43
+ if (cmakeArgs.none { it.startsWith("-DPROJECT_BUILD_DIR") }) {
44
44
  cmakeArgs.add("-DPROJECT_BUILD_DIR=${project.buildDir}")
45
45
  }
46
- if ("-DREACT_ANDROID_DIR" !in cmakeArgs) {
46
+ if (cmakeArgs.none { it.startsWith("-DREACT_ANDROID_DIR") }) {
47
47
  cmakeArgs.add(
48
48
  "-DREACT_ANDROID_DIR=${extension.reactNativeDir.file("ReactAndroid").get().asFile}")
49
49
  }
50
- if ("-DANDROID_STL" !in cmakeArgs) {
50
+ if (cmakeArgs.none { it.startsWith("-DANDROID_STL") }) {
51
51
  cmakeArgs.add("-DANDROID_STL=c++_shared")
52
52
  }
53
+ // Due to the new NDK toolchain file, the C++ flags gets overridden between compilation
54
+ // units. This is causing some libraries to don't be compiled with -DANDROID and other
55
+ // crucial flags. This can be revisited once we bump to NDK 25/26
56
+ if (cmakeArgs.none { it.startsWith("-DANDROID_USE_LEGACY_TOOLCHAIN_FILE") }) {
57
+ cmakeArgs.add("-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON")
58
+ }
53
59
 
54
60
  val architectures = project.getReactNativeArchitectures()
55
61
  // abiFilters are split ABI are not compatible each other, so we set the abiFilters