Skip to content

Commit

Permalink
android: use input and output dir syntax in Gradle
Browse files Browse the repository at this point in the history
Use inputs.dir and outputs.dir in Gradle.
Using inputs.file and outputs.file for directories is deprecated in
newer versions of Gradle.
  • Loading branch information
jaimecbernardo committed Jun 10, 2019
1 parent ad89864 commit aafb0a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ task CopyNodeProjectAssetsFolder (type:Sync) {
task GenerateNodeProjectAssetsLists {
dependsOn "CopyNodeProjectAssetsFolder"
description "Generates a list for runtime copying"
inputs.file "${rootProject.buildDir}/nodejs-assets/"
inputs.dir "${rootProject.buildDir}/nodejs-assets/"
outputs.file "${rootProject.buildDir}/nodejs-assets/file.list"
outputs.file "${rootProject.buildDir}/nodejs-assets/dir.list"
doLast{
Expand Down Expand Up @@ -342,15 +342,15 @@ if ("1".equals(shouldRebuildNativeModules)) {
description = "Building a native toolchain to compile nodejs-mobile native modules for ${abi_name}."
executable = "${ndk_bundle_path}/build/tools/make-standalone-toolchain.sh"
args "--toolchain=${temp_toolchain_name}-${temp_cc_ver}", "--arch=${temp_arch}", "--install-dir=${standalone_toolchain}", "--stl=libc++", "--force", "--platform=android-${_compileNativeModulesSdkVersion}"
outputs.file "${standalone_toolchain}"
outputs.dir "${standalone_toolchain}"
}

task "BuildNpmModules${abi_name}" (type:Exec) {
dependsOn "CopyNodeProjectAssets${abi_name}"
dependsOn "MakeToolchain${abi_name}"
description = "Building native modules for ${abi_name}."
inputs.file "${rootProject.buildDir}/nodejs-native-assets-temp-build/nodejs-native-assets-${abi_name}/copy.timestamp"
outputs.file "${rootProject.buildDir}/nodejs-native-assets-temp-build/nodejs-native-assets-${abi_name}/nodejs-project/"
outputs.dir "${rootProject.buildDir}/nodejs-native-assets-temp-build/nodejs-native-assets-${abi_name}/nodejs-project/"
workingDir "${rootProject.buildDir}/nodejs-native-assets-temp-build/nodejs-native-assets-${abi_name}/nodejs-project/"
commandLine npmCommandName, '--verbose', 'rebuild', '--build-from-source'
environment ('npm_config_node_engine', 'v8' )
Expand Down Expand Up @@ -393,7 +393,7 @@ if ("1".equals(shouldRebuildNativeModules)) {
task "GenerateNodeNativeAssetsLists${abi_name}" {
dependsOn "CopyBuiltNpmAssets${abi_name}"
description "Generates a list for runtime copying"
inputs.file "${rootProject.buildDir}/nodejs-native-assets/nodejs-native-assets-${abi_name}/"
inputs.dir "${rootProject.buildDir}/nodejs-native-assets/nodejs-native-assets-${abi_name}/"
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{
Expand Down

0 comments on commit aafb0a5

Please sign in to comment.