Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gradle-node-plugin to use actively maintained fork #25208

Merged
merged 1 commit into from
Sep 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions packages/react-native-bridge/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

if (buildGutenbergMobileJSBundle) {
classpath "com.moowork.gradle:gradle-node-plugin:1.3.1"
classpath 'com.github.node-gradle:gradle-node-plugin:3.0.0-rc2'
}
}
}
Expand All @@ -44,7 +44,7 @@ def npmFolder = file("${tempFolder}/npm")
if (buildGutenbergMobileJSBundle) {
println 'Building the Gutenberg Mobile JS bundle'

apply plugin: 'com.moowork.node'
apply plugin: 'com.github.node-gradle.node'

node {
// Version of node to use.
Expand All @@ -70,7 +70,7 @@ if (buildGutenbergMobileJSBundle) {
nodeModulesDir = file("${project.projectDir}/../../../../")
}

npm_install {
npmInstall {
args = ['--prefer-offline']
}
}
Expand Down Expand Up @@ -245,8 +245,8 @@ If they are changed, the isBundleUpToDate flag is switched to false. That flag i
}
}

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

task buildJSBundle(type: NpmTask) {
dependsOn bundleUpToDateCheck
Expand Down Expand Up @@ -328,8 +328,9 @@ 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(npmInstall)
nodeSetup.dependsOn(resetExtractedRNTools)
npmSetup.dependsOn(resetExtractedRNTools)

clean {
doFirst {
Expand Down