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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Makoto Kato 2019-09-20 08:19:51 +00:00
Родитель 754a4dc42b
Коммит 79f14fa6ca
3 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -233,7 +233,7 @@ public class SDKProcessor {
System.out.println("Processing platform bindings..."); System.out.println("Processing platform bindings...");
final String sdkJar = args[0]; final File sdkJar = new File(args[0]);
sMaxSdkVersion = Integer.parseInt(args[1]); sMaxSdkVersion = Integer.parseInt(args[1]);
final String outdir = args[2]; final String outdir = args[2];
@ -276,7 +276,7 @@ public class SDKProcessor {
// Used to track the calls to the various class-specific initialisation functions. // Used to track the calls to the various class-specific initialisation functions.
ClassLoader loader = null; ClassLoader loader = null;
try { try {
loader = URLClassLoader.newInstance(new URL[]{new URL("file://" + sdkJar)}, loader = URLClassLoader.newInstance(new URL[]{sdkJar.toURI().toURL()},
SDKProcessor.class.getClassLoader()); SDKProcessor.class.getClassLoader());
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e.toString()); throw new RuntimeException(e.toString());

Просмотреть файл

@ -494,7 +494,7 @@ task("generateSDKBindings", type: JavaExec) {
// From -Pgenerate_sdk_bindings_args=... on command line; missing in // From -Pgenerate_sdk_bindings_args=... on command line; missing in
// `android-gradle-dependencies` toolchain task. // `android-gradle-dependencies` toolchain task.
if (project.hasProperty('generate_sdk_bindings_args')) { if (project.hasProperty('generate_sdk_bindings_args')) {
args project.generate_sdk_bindings_args.split(':') args project.generate_sdk_bindings_args.split(';')
} }
} }

Просмотреть файл

@ -80,7 +80,7 @@ class MachCommands(MachCommandBase):
return os.path.basename(input).rsplit('-classes.txt', 1)[0] return os.path.basename(input).rsplit('-classes.txt', 1)[0]
bindings_inputs = list(itertools.chain(*((input, stem(input)) for input in inputs))) 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( ret = self.gradle(
self.substs['GRADLE_ANDROID_GENERATE_SDK_BINDINGS_TASKS'] + [bindings_args] + args, self.substs['GRADLE_ANDROID_GENERATE_SDK_BINDINGS_TASKS'] + [bindings_args] + args,