Chromium Code Reviews| Index: build/android/gyp/javac.py |
| diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py |
| index 15fe73db49827fed77692a61bd9aded108664d8d..b5dc65b9c8f96b9dd544ca2b8232c495313ed65e 100755 |
| --- a/build/android/gyp/javac.py |
| +++ b/build/android/gyp/javac.py |
| @@ -106,7 +106,7 @@ def DoJavac( |
| _MAX_MANIFEST_LINE_LEN = 72 |
| -def CreateManifest(manifest_path, classpath, main_class=None): |
| +def CreateManifest(manifest_path, classpath, main_class=None, is_mojo=False): |
|
qsr
2015/02/05 16:50:06
What about adding a dict instead of this mojo spec
etiennej
2015/02/06 16:22:29
Done.
|
| """Creates a manifest file with the given parameters. |
| This generates a manifest file that compiles with the spec found at |
| @@ -121,7 +121,10 @@ def CreateManifest(manifest_path, classpath, main_class=None): |
| """ |
| output = ['Manifest-Version: 1.0'] |
| if main_class: |
| - output.append('Main-Class: %s' % main_class) |
| + if not is_mojo: |
| + output.append('Main-Class: %s' % main_class) |
| + else: |
| + output.append('Mojo-Class: %s' % main_class) |
| if classpath: |
| sanitized_paths = [] |
| for path in classpath: |
| @@ -183,6 +186,10 @@ def main(argv): |
| parser.add_option( |
| '--main-class', |
| help='The class containing the main method.') |
| + parser.add_option( |
| + '--mojo-jar', |
| + type=int, |
| + help='The output JAR is a mojo application.') |
|
qsr
2015/02/05 16:50:07
And here you can have a repeated option that would
etiennej
2015/02/06 16:22:29
Done.
|
| parser.add_option('--stamp', help='Path to touch on success.') |
| @@ -235,7 +242,7 @@ def main(argv): |
| if options.main_class: |
| manifest_file = os.path.join(temp_dir, 'manifest') |
| CreateManifest(manifest_file, classpath, |
| - options.main_class) |
| + options.main_class, options.mojo_jar) |
| else: |
| manifest_file = None |
| jar.JarDirectory(classes_dir, |