Skip to content

Commit aafb0a5

Browse files
android: use input and output dir syntax in Gradle
Use inputs.dir and outputs.dir in Gradle. Using inputs.file and outputs.file for directories is deprecated in newer versions of Gradle.
1 parent ad89864 commit aafb0a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ task CopyNodeProjectAssetsFolder (type:Sync) {
107107
task GenerateNodeProjectAssetsLists {
108108
dependsOn "CopyNodeProjectAssetsFolder"
109109
description "Generates a list for runtime copying"
110-
inputs.file "${rootProject.buildDir}/nodejs-assets/"
110+
inputs.dir "${rootProject.buildDir}/nodejs-assets/"
111111
outputs.file "${rootProject.buildDir}/nodejs-assets/file.list"
112112
outputs.file "${rootProject.buildDir}/nodejs-assets/dir.list"
113113
doLast{
@@ -342,15 +342,15 @@ if ("1".equals(shouldRebuildNativeModules)) {
342342
description = "Building a native toolchain to compile nodejs-mobile native modules for ${abi_name}."
343343
executable = "${ndk_bundle_path}/build/tools/make-standalone-toolchain.sh"
344344
args "--toolchain=${temp_toolchain_name}-${temp_cc_ver}", "--arch=${temp_arch}", "--install-dir=${standalone_toolchain}", "--stl=libc++", "--force", "--platform=android-${_compileNativeModulesSdkVersion}"
345-
outputs.file "${standalone_toolchain}"
345+
outputs.dir "${standalone_toolchain}"
346346
}
347347

348348
task "BuildNpmModules${abi_name}" (type:Exec) {
349349
dependsOn "CopyNodeProjectAssets${abi_name}"
350350
dependsOn "MakeToolchain${abi_name}"
351351
description = "Building native modules for ${abi_name}."
352352
inputs.file "${rootProject.buildDir}/nodejs-native-assets-temp-build/nodejs-native-assets-${abi_name}/copy.timestamp"
353-
outputs.file "${rootProject.buildDir}/nodejs-native-assets-temp-build/nodejs-native-assets-${abi_name}/nodejs-project/"
353+
outputs.dir "${rootProject.buildDir}/nodejs-native-assets-temp-build/nodejs-native-assets-${abi_name}/nodejs-project/"
354354
workingDir "${rootProject.buildDir}/nodejs-native-assets-temp-build/nodejs-native-assets-${abi_name}/nodejs-project/"
355355
commandLine npmCommandName, '--verbose', 'rebuild', '--build-from-source'
356356
environment ('npm_config_node_engine', 'v8' )
@@ -393,7 +393,7 @@ if ("1".equals(shouldRebuildNativeModules)) {
393393
task "GenerateNodeNativeAssetsLists${abi_name}" {
394394
dependsOn "CopyBuiltNpmAssets${abi_name}"
395395
description "Generates a list for runtime copying"
396-
inputs.file "${rootProject.buildDir}/nodejs-native-assets/nodejs-native-assets-${abi_name}/"
396+
inputs.dir "${rootProject.buildDir}/nodejs-native-assets/nodejs-native-assets-${abi_name}/"
397397
outputs.file "${rootProject.buildDir}/nodejs-native-assets/nodejs-native-assets-${abi_name}/file.list"
398398
outputs.file "${rootProject.buildDir}/nodejs-native-assets/nodejs-native-assets-${abi_name}/dir.list"
399399
doLast{

0 commit comments

Comments
 (0)