Skip to content

Commit

Permalink
android: modify npm_gyp_path_to_use (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
okhiroyuki authored Oct 28, 2023
1 parent f454126 commit 9076fa8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,11 @@ cdvPluginPostBuildExtras += { ->
description = "Building native modules for ${abi_name}."
workingDir "${rootProject.buildDir}/nodejs-native-assets-temp-build/nodejs-native-assets-${abi_name}/nodejs-project/"

String npm_gyp_path_to_use;
if( file("${rootProject.projectDir}/../../plugins/@red-mobile/nodejs-mobile-cordova/node_modules/nodejs-mobile-gyp/bin/node-gyp.js").exists() ) {
npm_gyp_path_to_use = "${rootProject.projectDir}/../../plugins/@red-mobile/nodejs-mobile-cordova/node_modules/nodejs-mobile-gyp/bin/node-gyp.js";
String npm_gyp_path_to_use; // Check common paths for nodejs-mobile-gyp
if ( file("${project.projectDir}/../../nodejs-mobile-gyp/bin/node-gyp.js").exists() ) {
npm_gyp_path_to_use = "${project.projectDir}/../../nodejs-mobile-gyp/bin/node-gyp.js";
} else {
npm_gyp_path_to_use = "${rootProject.projectDir}/../../node_modules/nodejs-mobile-gyp/bin/node-gyp.js";
npm_gyp_path_to_use = "${project.projectDir}/../node_modules/nodejs-mobile-gyp/bin/node-gyp.js";
}

environment ('npm_config_node_engine', 'v8' )
Expand Down

0 comments on commit 9076fa8

Please sign in to comment.