Skip to content

Commit

Permalink
fix(gradle-plugin): fix nightly build regression (#37332)
Browse files Browse the repository at this point in the history
Summary:
Nightly builds of Android no longer build due to a recent version format change.

## Changelog:

[ANDROID] [FIXED] - Fixed nightly builds of Android no longer building due to a recent version format change

Pull Request resolved: #37332

Test Plan:
```
git clone https://github.com/microsoft/react-native-test-app.git
cd react-native-test-app
npm run set-react-version nightly
cd example
yarn android
```

Reviewed By: jacdebug

Differential Revision: D45690926

Pulled By: cortinico

fbshipit-source-id: dc935733607c2b33ba296b507a98f43ba483e348
  • Loading branch information
tido64 authored and facebook-github-bot committed May 9, 2023
1 parent ec66f2e commit cceef57
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cceef57

Please sign in to comment.