Bug 1575438 - Don't use colon as argument separator on generate-sdk-bindings task. r=nalexander
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 20 Sep 2019 08:19:51 +0000
changeset 494249 71593c0fa93d2219efc726df46aa39b118ed3d1f
parent 494248 8877167f6d201cddd098cd719a80cb135ec4d942
child 494250 18d269bf8559b7494e5fd42d66e930e3a01d5fb2
push id114114
push userdluca@mozilla.com
push dateFri, 20 Sep 2019 22:00:08 +0000
treeherdermozilla-inbound@56e11fddf939 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1575438
milestone71.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 1575438 - Don't use colon as argument separator on generate-sdk-bindings task. r=nalexander The colon is drive separator on Windows, so if supporting Windows as build environment, we have to change it. Differential Revision: https://phabricator.services.mozilla.com/D44932
mobile/android/annotations/src/main/java/org/mozilla/gecko/annotationProcessors/SDKProcessor.java
mobile/android/geckoview/build.gradle
mobile/android/mach_commands.py
--- 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
@@ -228,17 +228,17 @@ public class SDKProcessor {
         // We expect a list of jars on the commandline. If missing, whinge about it.
         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];
+        final File sdkJar = new File(args[0]);
         sMaxSdkVersion = Integer.parseInt(args[1]);
         final String outdir = args[2];
 
         final LintCliClient lintClient = new LintCliClient();
         sApiLookup = ApiLookup.get(lintClient);
 
         for (int argIndex = 3; argIndex < args.length; argIndex += 2) {
             final String configFile = args[argIndex];
@@ -271,17 +271,17 @@ public class SDKProcessor {
                     "namespace mozilla {\n" +
                     "namespace java {\n" +
                     "namespace sdk {\n" +
                     "\n");
 
             // Used to track the calls to the various class-specific initialisation functions.
             ClassLoader loader = null;
             try {
-                loader = URLClassLoader.newInstance(new URL[]{new URL("file://" + sdkJar)},
+                loader = URLClassLoader.newInstance(new URL[]{sdkJar.toURI().toURL()},
                         SDKProcessor.class.getClassLoader());
             } catch (Exception e) {
                 throw new RuntimeException(e.toString());
             }
 
             try {
                 final ClassInfo[] classes = getClassList(configFile);
                 for (final ClassInfo cls : classes) {
--- a/mobile/android/geckoview/build.gradle
+++ b/mobile/android/geckoview/build.gradle
@@ -489,17 +489,17 @@ task("generateSDKBindings", type: JavaEx
     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; missing in
         // `android-gradle-dependencies` toolchain task.
         if (project.hasProperty('generate_sdk_bindings_args')) {
-            args project.generate_sdk_bindings_args.split(':')
+            args project.generate_sdk_bindings_args.split(';')
         }
     }
 
     workingDir "${topsrcdir}/widget/android/bindings"
 
     dependsOn project(':annotations').jar
 }
 
--- a/mobile/android/mach_commands.py
+++ b/mobile/android/mach_commands.py
@@ -75,17 +75,17 @@ class MachCommands(MachCommandBase):
     def android_generate_sdk_bindings(self, inputs, args):
         import itertools
 
         def stem(input):
             # Turn "/path/to/ClassName-classes.txt" into "ClassName".
             return os.path.basename(input).rsplit('-classes.txt', 1)[0]
 
         bindings_inputs = list(itertools.chain(*((input, stem(input)) for input in inputs)))
-        bindings_args = '-Pgenerate_sdk_bindings_args={}'.format(':'.join(bindings_inputs))
+        bindings_args = '-Pgenerate_sdk_bindings_args={}'.format(';'.join(bindings_inputs))
 
         ret = self.gradle(
             self.substs['GRADLE_ANDROID_GENERATE_SDK_BINDINGS_TASKS'] + [bindings_args] + args,
             verbose=True)
 
         return ret
 
     @SubCommand('android', 'generate-generated-jni-wrappers',