react-native-tvos 0.71.7-0rc0 → 0.71.7-0rc1
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/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/template/android/app/build.gradle +2 -2
- package/template/android/gradle.properties +0 -4
- package/template/package.json +3 -1
- package/template/patches/react-native-gradle-plugin+0.71.17.patch +76 -0
package/React/Base/RCTVersion.m
CHANGED
package/package.json
CHANGED
|
@@ -156,7 +156,7 @@ dependencies {
|
|
|
156
156
|
// in gradle.properties for now
|
|
157
157
|
// We also use the io.github.react-native-tvos group for the react-android and hermes-android dependencies
|
|
158
158
|
|
|
159
|
-
implementation("io.github.react-native-tvos:react-android
|
|
159
|
+
implementation("io.github.react-native-tvos:react-android")
|
|
160
160
|
|
|
161
161
|
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
|
|
162
162
|
|
|
@@ -167,7 +167,7 @@ dependencies {
|
|
|
167
167
|
|
|
168
168
|
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
|
|
169
169
|
if (hermesEnabled.toBoolean()) {
|
|
170
|
-
implementation("io.github.react-native-tvos:hermes-android
|
|
170
|
+
implementation("io.github.react-native-tvos:hermes-android")
|
|
171
171
|
} else {
|
|
172
172
|
implementation jscFlavor
|
|
173
173
|
}
|
|
@@ -42,7 +42,3 @@ newArchEnabled=false
|
|
|
42
42
|
# Use this property to enable or disable the Hermes JS engine.
|
|
43
43
|
# If set to false, you will be using JSC instead.
|
|
44
44
|
hermesEnabled=true
|
|
45
|
-
|
|
46
|
-
# react-native-gradle-plugin does not yet set the version automatically
|
|
47
|
-
# for the TV repo, so we set the version here
|
|
48
|
-
REACT_NATIVE_TV_VERSION_STRING=0.71.7-0rc0
|
package/template/package.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"version": "0.0.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
|
+
"postinstall": "patch-package",
|
|
6
7
|
"android": "react-native run-android",
|
|
7
8
|
"ios": "react-native run-ios",
|
|
8
9
|
"lint": "eslint .",
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
},
|
|
12
13
|
"dependencies": {
|
|
13
14
|
"react": "18.2.0",
|
|
14
|
-
"react-native": "npm:react-native-tvos@0.71.7-
|
|
15
|
+
"react-native": "npm:react-native-tvos@0.71.7-0rc1"
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
18
|
"@babel/core": "^7.20.0",
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
"eslint": "^8.19.0",
|
|
27
28
|
"jest": "^29.2.1",
|
|
28
29
|
"metro-react-native-babel-preset": "0.73.9",
|
|
30
|
+
"patch-package": "^7.0.0",
|
|
29
31
|
"prettier": "^2.4.1",
|
|
30
32
|
"react-test-renderer": "18.2.0",
|
|
31
33
|
"typescript": "4.8.4"
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
diff --git a/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt b/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt
|
|
2
|
+
index 10f4b74..ab8bdc1 100644
|
|
3
|
+
--- a/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt
|
|
4
|
+
+++ b/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt
|
|
5
|
+
@@ -19,6 +19,7 @@ import com.facebook.react.utils.AgpConfiguratorUtils.configureDevPorts
|
|
6
|
+
import com.facebook.react.utils.BackwardCompatUtils.configureBackwardCompatibilityReactMap
|
|
7
|
+
import com.facebook.react.utils.DependencyUtils.configureDependencies
|
|
8
|
+
import com.facebook.react.utils.DependencyUtils.configureRepositories
|
|
9
|
+
+import com.facebook.react.utils.DependencyUtils.readGroupString
|
|
10
|
+
import com.facebook.react.utils.DependencyUtils.readVersionString
|
|
11
|
+
import com.facebook.react.utils.JsonUtils
|
|
12
|
+
import com.facebook.react.utils.NdkConfiguratorUtils.configureReactNativeNdk
|
|
13
|
+
@@ -56,7 +57,8 @@ class ReactPlugin : Plugin<Project> {
|
|
14
|
+
val reactNativeDir = extension.reactNativeDir.get().asFile
|
|
15
|
+
val propertiesFile = File(reactNativeDir, "ReactAndroid/gradle.properties")
|
|
16
|
+
val versionString = readVersionString(propertiesFile)
|
|
17
|
+
- configureDependencies(project, versionString)
|
|
18
|
+
+ val groupString = readGroupString(propertiesFile)
|
|
19
|
+
+ configureDependencies(project, versionString, groupString)
|
|
20
|
+
configureRepositories(project, reactNativeDir)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
diff --git a/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt b/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt
|
|
24
|
+
index c8760f6..c28cd2c 100644
|
|
25
|
+
--- a/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt
|
|
26
|
+
+++ b/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt
|
|
27
|
+
@@ -43,7 +43,7 @@ internal object DependencyUtils {
|
|
28
|
+
* - Forcing the react-android/hermes-android version to the one specified in the package.json
|
|
29
|
+
* - Substituting `react-native` with `react-android` and `hermes-engine` with `hermes-android`.
|
|
30
|
+
*/
|
|
31
|
+
- fun configureDependencies(project: Project, versionString: String) {
|
|
32
|
+
+ fun configureDependencies(project: Project, versionString: String, groupString: String = defaultGroupString) {
|
|
33
|
+
if (versionString.isBlank()) return
|
|
34
|
+
project.rootProject.allprojects { eachProject ->
|
|
35
|
+
eachProject.configurations.all { configuration ->
|
|
36
|
+
@@ -53,17 +53,17 @@ internal object DependencyUtils {
|
|
37
|
+
// implementation("com.facebook.react:react-native:+") and resolve the right dependency.
|
|
38
|
+
configuration.resolutionStrategy.dependencySubstitution {
|
|
39
|
+
it.substitute(it.module("com.facebook.react:react-native"))
|
|
40
|
+
- .using(it.module("com.facebook.react:react-android:${versionString}"))
|
|
41
|
+
+ .using(it.module("${groupString}:react-android:${versionString}"))
|
|
42
|
+
.because(
|
|
43
|
+
"The react-native artifact was deprecated in favor of react-android due to https://github.com/facebook/react-native/issues/35210.")
|
|
44
|
+
it.substitute(it.module("com.facebook.react:hermes-engine"))
|
|
45
|
+
- .using(it.module("com.facebook.react:hermes-android:${versionString}"))
|
|
46
|
+
+ .using(it.module("${groupString}:hermes-android:${versionString}"))
|
|
47
|
+
.because(
|
|
48
|
+
"The hermes-engine artifact was deprecated in favor of hermes-android due to https://github.com/facebook/react-native/issues/35210.")
|
|
49
|
+
}
|
|
50
|
+
configuration.resolutionStrategy.force(
|
|
51
|
+
- "com.facebook.react:react-android:${versionString}",
|
|
52
|
+
- "com.facebook.react:hermes-android:${versionString}",
|
|
53
|
+
+ "${groupString}:react-android:${versionString}",
|
|
54
|
+
+ "${groupString}:hermes-android:${versionString}",
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
@@ -81,9 +81,18 @@ internal object DependencyUtils {
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
+ // Allows react-native-tvos to get its dependencies correctly with its custom Maven group name
|
|
63
|
+
+ fun readGroupString(propertiesFile: File): String {
|
|
64
|
+
+ val reactAndroidProperties = Properties()
|
|
65
|
+
+ propertiesFile.inputStream().use { reactAndroidProperties.load(it) }
|
|
66
|
+
+ return reactAndroidProperties["GROUP"] as? String ?: defaultGroupString
|
|
67
|
+
+ }
|
|
68
|
+
+
|
|
69
|
+
fun Project.mavenRepoFromUrl(url: String): MavenArtifactRepository =
|
|
70
|
+
project.repositories.maven { it.url = URI.create(url) }
|
|
71
|
+
|
|
72
|
+
fun Project.mavenRepoFromURI(uri: URI): MavenArtifactRepository =
|
|
73
|
+
project.repositories.maven { it.url = uri }
|
|
74
|
+
+
|
|
75
|
+
+ val defaultGroupString = "com.facebook.react"
|
|
76
|
+
}
|