@react-native/gradle-plugin 0.89.0-nightly-20260909-b830082cf → 0.89.0-nightly-20260912-e0224fd40
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
|
@@ -95,7 +95,7 @@ class ReactPlugin : Plugin<Project> {
|
|
|
95
95
|
val versionAndGroupStrings =
|
|
96
96
|
readVersionAndGroupStrings(project, propertiesFile, hermesVersionPropertiesFile)
|
|
97
97
|
configureDependencies(project, versionAndGroupStrings)
|
|
98
|
-
configureRepositories(project, versionAndGroupStrings
|
|
98
|
+
configureRepositories(project, versionAndGroupStrings)
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
configureReactNativeNdk(project, extension)
|
package/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt
CHANGED
|
@@ -31,6 +31,7 @@ import org.gradle.api.artifacts.repositories.MavenArtifactRepository
|
|
|
31
31
|
internal object DependencyUtils {
|
|
32
32
|
private const val REACT_NATIVE_MAVEN_MIRROR_URL = "https://repo.reactnative.dev/maven2"
|
|
33
33
|
private const val REACT_NATIVE_MAVEN_MIRROR_ENABLED_ENV = "RCT_REACT_NATIVE_MAVEN_MIRROR_ENABLED"
|
|
34
|
+
private const val UNPUBLISHED_MAVEN_VERSION = "1000.0.0"
|
|
34
35
|
|
|
35
36
|
internal data class Coordinates(
|
|
36
37
|
val versionString: String,
|
|
@@ -124,6 +125,41 @@ internal object DependencyUtils {
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
|
|
128
|
+
/**
|
|
129
|
+
* Configures repositories without asking remote repositories for versions that are known to be
|
|
130
|
+
* unpublished.
|
|
131
|
+
*/
|
|
132
|
+
fun configureRepositories(project: Project, coordinates: Coordinates) {
|
|
133
|
+
configureRepositories(project, coordinates.isNightly)
|
|
134
|
+
|
|
135
|
+
project.rootProject.allprojects { eachProject ->
|
|
136
|
+
eachProject.repositories.withType(MavenArtifactRepository::class.java).configureEach { repo ->
|
|
137
|
+
if (repo.url.scheme != "file") {
|
|
138
|
+
repo.content { content ->
|
|
139
|
+
if (!coordinates.versionString.isMavenArtifactVersionPublished()) {
|
|
140
|
+
setOf(DEFAULT_INTERNAL_REACT_PUBLISHING_GROUP, coordinates.reactGroupString)
|
|
141
|
+
.forEach { group ->
|
|
142
|
+
content.excludeVersion(group, "react-native", UNPUBLISHED_MAVEN_VERSION)
|
|
143
|
+
content.excludeVersion(group, "react-android", UNPUBLISHED_MAVEN_VERSION)
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (!coordinates.hermesVersionString.isMavenArtifactVersionPublished()) {
|
|
147
|
+
setOf(
|
|
148
|
+
DEFAULT_INTERNAL_REACT_PUBLISHING_GROUP,
|
|
149
|
+
DEFAULT_INTERNAL_HERMES_PUBLISHING_GROUP,
|
|
150
|
+
coordinates.hermesGroupString,
|
|
151
|
+
)
|
|
152
|
+
.forEach { group ->
|
|
153
|
+
content.excludeVersion(group, "hermes-engine", UNPUBLISHED_MAVEN_VERSION)
|
|
154
|
+
content.excludeVersion(group, "hermes-android", UNPUBLISHED_MAVEN_VERSION)
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
127
163
|
/**
|
|
128
164
|
* This method takes care of configuring the resolution strategy for both the app and all the 3rd
|
|
129
165
|
* party libraries which are auto-linked. Specifically it takes care of:
|
|
@@ -303,6 +339,8 @@ internal object DependencyUtils {
|
|
|
303
339
|
|
|
304
340
|
internal fun String.isNightly(): Boolean = this.startsWith("0.0.0") || "-nightly-" in this
|
|
305
341
|
|
|
342
|
+
internal fun String.isMavenArtifactVersionPublished(): Boolean = this != UNPUBLISHED_MAVEN_VERSION
|
|
343
|
+
|
|
306
344
|
internal fun Project.exclusiveEnterpriseRepository() =
|
|
307
345
|
when {
|
|
308
346
|
hasProperty(SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY) ->
|