Bug 1509572 - Part 4: Make `geckoview:generateSDKBindings` work without arguments. r=snorp
☠☠ backed out by 79ae8ec996e6 ☠ ☠
authorNick Alexander <nalexander@mozilla.com>
Mon, 26 Nov 2018 19:16:39 +0000
changeset 507334 122d6f1a1136f696c88481c1cb1d97451a952a77
parent 507333 bc6911d14ae0612c7f78858ca2ee3e4472911317
child 507335 f6653c7d29671c942662c75945ae4f82ef21a31d
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1509572
milestone65.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 1509572 - Part 4: Make `geckoview:generateSDKBindings` work without arguments. r=snorp I'm not sure how this ever worked in the `android-gradle-dependencies` task -- it must have been because of `--continue`. Depends on D12792 Differential Revision: https://phabricator.services.mozilla.com/D12793
mobile/android/annotations/src/main/java/org/mozilla/gecko/annotationProcessors/SDKProcessor.java
mobile/android/geckoview/build.gradle
--- a/mobile/android/annotations/src/main/java/org/mozilla/gecko/annotationProcessors/SDKProcessor.java
+++ b/mobile/android/annotations/src/main/java/org/mozilla/gecko/annotationProcessors/SDKProcessor.java
@@ -221,18 +221,18 @@ public class SDKProcessor {
                 }
             }
             return new AnnotationInfo(stubName, mode, thread, target, noLiteral);
         }
     }
 
     public static void main(String[] args) throws Exception {
         // We expect a list of jars on the commandline. If missing, whinge about it.
-        if (args.length < 5 || args.length % 2 != 1) {
-            System.err.println("Usage: java SDKProcessor sdkjar max-sdk-version outdir [configfile fileprefix]+");
+        if (args.length < 3 || args.length % 2 != 1) {
+            System.err.println("Usage: java SDKProcessor sdkjar max-sdk-version outdir [configfile fileprefix]*");
             System.exit(1);
         }
 
         System.out.println("Processing platform bindings...");
 
         final String sdkJar = args[0];
         sMaxSdkVersion = Integer.parseInt(args[1]);
         final String outdir = args[2];
--- a/mobile/android/geckoview/build.gradle
+++ b/mobile/android/geckoview/build.gradle
@@ -375,18 +375,21 @@ task("generateSDKBindings", type: JavaEx
 
     main = 'org.mozilla.gecko.annotationProcessors.SDKProcessor'
     args android.bootClasspath
     args 16
     args "${topobjdir}/widget/android/bindings"
 
     // Configure the arguments at evaluation-time, not at configuration-time.
     doFirst {
-        // From -Pgenerate_sdk_bindings_args=... on command line.
-        args project.generate_sdk_bindings_args.split(':')
+        // From -Pgenerate_sdk_bindings_args=... on command line; missing in
+        // `android-gradle-dependencies` toolchain task.
+        if (project.hasProperty('generate_sdk_bindings_args')) {
+            args project.generate_sdk_bindings_args.split(':')
+        }
     }
 
     workingDir "${topsrcdir}/widget/android/bindings"
 
     dependsOn project(':annotations').jar
 }
 
 apply from: "${topsrcdir}/mobile/android/gradle/jacoco_dependencies.gradle"