Skip to content

Commit

Permalink
android: check if native modules assets exist
Browse files Browse the repository at this point in the history
Checks if the native modules assets folder exists before trying
to create the files and dir lists for the current arch at build time.
  • Loading branch information
jaimecbernardo committed Jun 20, 2018
1 parent 6cd38b0 commit 8b7e854
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ if ("1".equals(shouldRebuildNativeModules)) {
outputs.file "${rootProject.buildDir}/nodejs-native-assets/nodejs-native-assets-${abi_name}/file.list"
outputs.file "${rootProject.buildDir}/nodejs-native-assets/nodejs-native-assets-${abi_name}/dir.list"
doLast{
if(!(new File("${rootProject.buildDir}/nodejs-native-assets/nodejs-native-assets-${abi_name}/")).exists()) {
// If the native assets folder doesn't exist from the copy task, skip the creation of the file.list
return;
}
delete "${rootProject.buildDir}/nodejs-native-assets/nodejs-native-assets-${abi_name}/file.list"
delete "${rootProject.buildDir}/nodejs-native-assets/nodejs-native-assets-${abi_name}/dir.list"
String file_list = "";
Expand Down

0 comments on commit 8b7e854

Please sign in to comment.