diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt index 583fc13f377dd5..fbdf6fe131b545 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt +++ b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt @@ -84,7 +84,7 @@ internal object DependencyUtils { val versionStringFromFile = reactAndroidProperties["VERSION_NAME"] as? String ?: "" // If on a nightly, we need to fetch the -SNAPSHOT artifact from Sonatype. val versionString = - if (versionStringFromFile.startsWith("0.0.0")) { + if (versionStringFromFile.startsWith("0.0.0") || "-nightly-" in versionStringFromFile) { "$versionStringFromFile-SNAPSHOT" } else { versionStringFromFile