Bug 1366644 - Part 1: Avoid deprecated Gradle features. r=maliu
authorNick Alexander <nalexander@mozilla.com>
Tue, 20 Jun 2017 16:50:12 -0700
changeset 386852 ba0e40a0b33f21b78a17c46c5ce0d586c1a28ab6
parent 386851 1a0e10b4ea13fbae7603428de081b159378147c5
child 386853 ea8854aacc680feb363e63451aca3bf661138698
push id96311
push userarchaeopteryx@coole-files.de
push dateWed, 18 Oct 2017 09:52:02 +0000
treeherdermozilla-inbound@a8a1e8cc1980 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaliu
bugs1366644
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1366644 - Part 1: Avoid deprecated Gradle features. r=maliu MozReview-Commit-ID: LZ9clAsEUkd
mobile/android/gradle/with_gecko_binaries.gradle
--- a/mobile/android/gradle/with_gecko_binaries.gradle
+++ b/mobile/android/gradle/with_gecko_binaries.gradle
@@ -32,17 +32,17 @@
 // That arrangement labels them nicely in IntelliJ.  See the comment in the
 // :omnijar project for more context.
 evaluationDependsOn(':omnijar')
 
 task buildOmnijar(type:Exec) {
     dependsOn rootProject.generateCodeAndResources
 
     // See comment in :omnijar project regarding interface mismatches here.
-    inputs.source project(':omnijar').sourceSets.main.resources.srcDirs
+    inputs.file(project(':omnijar').sourceSets.main.resources.srcDirs).skipWhenEmpty() 
 
     // Produce a single output file.
     outputs.file "${topobjdir}/dist/fennec/assets/omni.ja"
 
     workingDir "${topobjdir}"
 
     commandLine mozconfig.substs.GMAKE
     args '-C'
@@ -66,30 +66,34 @@ task syncOmnijarFromDistDir(type: Sync) 
     into("${project.buildDir}/generated/omnijar")
     from("${topobjdir}/dist/${omnijar_dir}/omni.ja",
          "${topobjdir}/dist/${omnijar_dir}/assets/omni.ja") {
         // Throw an exception if we find multiple, potentially conflicting omni.ja files.
         duplicatesStrategy 'fail'
     }
 }
 
-task checkLibsExistInDistDir<< {
-    if (syncLibsFromDistDir.source.empty) {
-        throw new GradleException("Required JNI libraries not found in ${topobjdir}/dist/fennec/lib.  Have you built and packaged?")
+task checkLibsExistInDistDir {
+    doLast {
+        if (syncLibsFromDistDir.source.empty) {
+            throw new GradleException("Required JNI libraries not found in ${topobjdir}/dist/fennec/lib.  Have you built and packaged?")
+        }
     }
 }
 
 task syncLibsFromDistDir(type: Sync, dependsOn: checkLibsExistInDistDir) {
     into("${project.buildDir}/generated/jniLibs")
     from("${topobjdir}/dist/fennec/lib")
 }
 
-task checkAssetsExistInDistDir<< {
-    if (syncAssetsFromDistDir.source.empty) {
-        throw new GradleException("Required assets not found in ${topobjdir}/dist/fennec/assets.  Have you built and packaged?")
+task checkAssetsExistInDistDir {
+    doLast {
+        if (syncAssetsFromDistDir.source.empty) {
+            throw new GradleException("Required assets not found in ${topobjdir}/dist/fennec/assets.  Have you built and packaged?")
+        }
     }
 }
 
 task syncAssetsFromDistDir(type: Sync, dependsOn: checkAssetsExistInDistDir) {
     into("${project.buildDir}/generated/assets")
     from("${topobjdir}/dist/fennec/assets") {
         exclude 'omni.ja'
     }