Skip to content

Commit

Permalink
Use npm ci for reproducible builds
Browse files Browse the repository at this point in the history
  • Loading branch information
hypest committed Jun 19, 2020
1 parent 85f4bf8 commit 6f7b9e5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/react-native-bridge/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ if (buildGutenbergMobileJSBundle) {
// Set the work directory where node_modules should be located
nodeModulesDir = file("${project.projectDir}/../../../../")
}

npm_install {
args = ['--prefer-offline']
}
}

// import the `readReactNativeVersion()` function
Expand Down Expand Up @@ -239,8 +235,8 @@ If they are changed, the isBundleUpToDate flag is switched to false. That flag i
}
}

npm_install.dependsOn bundleUpToDateCheck
npm_install.onlyIf { !isBundleUpToDate() }
npm_ci.dependsOn bundleUpToDateCheck
npm_ci.onlyIf { !isBundleUpToDate() }

task buildJSBundle(type: NpmTask) {
dependsOn bundleUpToDateCheck
Expand Down Expand Up @@ -306,6 +302,6 @@ If they are changed, the isBundleUpToDate flag is switched to false. That flag i
backupHermesDebugAAR.dependsOn(backupHermesReleaseAAR)
backupHermesReleaseAAR.dependsOn(copyJSBundle)
copyJSBundle.dependsOn(buildJSBundle)
buildJSBundle.dependsOn(npm_install)
buildJSBundle.dependsOn(npm_ci)
nodeSetup.dependsOn(resetExtractedRNTools)
}

0 comments on commit 6f7b9e5

Please sign in to comment.