Skip to content

Commit 4514041

Browse files
nicknovitskifacebook-github-bot
authored andcommitted
- Resolve two gradle deprecation warnings (#22360)
Summary: > Configure project :ReactAndroid > The Task.leftShift(Closure) method has been deprecated. This is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. > Task :ReactAndroid:buildReactNdkLib > A problem was found with the configuration of task ':ReactAndroid:buildReactNdkLib'. Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated and is scheduled to be removed in Gradle 5.0. > - File '[...]/react-native/ReactAndroid/src/main/jni/react' specified for property '$1' is not a file. Pull Request resolved: #22360 Differential Revision: D13176269 Pulled By: hramos fbshipit-source-id: cf6d498049b955d3920d356f2d68f3bc43008c56
1 parent 3355c52 commit 4514041

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

ReactAndroid/build.gradle

+11-9
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,16 @@ task downloadJSCHeaders(type: Download) {
158158
}
159159

160160
// Create Android.mk library module based on so files from mvn + include headers fetched from webkit.org
161-
task prepareJSC(dependsOn: dependenciesPath ? [] : [downloadJSCHeaders]) << {
162-
copy {
163-
from zipTree(configurations.compile.fileCollection { dep -> dep.name == 'android-jsc' }.singleFile)
164-
from dependenciesPath ? "$dependenciesPath/jsc-headers" : {downloadJSCHeaders.dest}
165-
from 'src/main/jni/third-party/jsc'
166-
include 'jni/**/*.so', '*.h', 'Android.mk'
167-
filesMatching('*.h', { fname -> fname.path = "JavaScriptCore/${fname.path}"})
168-
into "$thirdPartyNdkDir/jsc";
161+
task prepareJSC(dependsOn: dependenciesPath ? [] : [downloadJSCHeaders]) {
162+
doLast {
163+
copy {
164+
from zipTree(configurations.compile.fileCollection { dep -> dep.name == 'android-jsc' }.singleFile)
165+
from dependenciesPath ? "$dependenciesPath/jsc-headers" : {downloadJSCHeaders.dest}
166+
from 'src/main/jni/third-party/jsc'
167+
include 'jni/**/*.so', '*.h', 'Android.mk'
168+
filesMatching('*.h', { fname -> fname.path = "JavaScriptCore/${fname.path}"})
169+
into "$thirdPartyNdkDir/jsc";
170+
}
169171
}
170172
}
171173

@@ -231,7 +233,7 @@ def getNdkBuildFullPath() {
231233
}
232234

233235
task buildReactNdkLib(dependsOn: [prepareJSC, prepareBoost, prepareDoubleConversion, prepareFolly, prepareGlog], type: Exec) {
234-
inputs.file('src/main/jni/react')
236+
inputs.dir('src/main/jni/react')
235237
outputs.dir("$buildDir/react-ndk/all")
236238
commandLine getNdkBuildFullPath(),
237239
'NDK_PROJECT_PATH=null',

0 commit comments

Comments
 (0)