OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This file is meant to be included into a target to provide a rule to build | 5 # This file is meant to be included into a target to provide a rule to build |
6 # a JAR file for use on a host in a consistent manner. If a main class is | 6 # a JAR file for use on a host in a consistent manner. If a main class is |
7 # specified, this file will also generate an executable to run the jar in the | 7 # specified, this file will also generate an executable to run the jar in the |
8 # output folder's /bin/ directory. | 8 # output folder's /bin/ directory. |
9 # | 9 # |
10 # To use this, create a gyp target with the following form: | 10 # To use this, create a gyp target with the following form: |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 'excluded_src_paths': [], | 46 'excluded_src_paths': [], |
47 'generated_src_dirs': [], | 47 'generated_src_dirs': [], |
48 'input_jars_paths': [], | 48 'input_jars_paths': [], |
49 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', | 49 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', |
50 'jar_dir': '<(PRODUCT_DIR)/lib.java', | 50 'jar_dir': '<(PRODUCT_DIR)/lib.java', |
51 'jar_excluded_classes': [], | 51 'jar_excluded_classes': [], |
52 'jar_name': '<(_target_name).jar', | 52 'jar_name': '<(_target_name).jar', |
53 'jar_path': '<(jar_dir)/<(jar_name)', | 53 'jar_path': '<(jar_dir)/<(jar_name)', |
54 'main_class%': '', | 54 'main_class%': '', |
55 'stamp': '<(intermediate_dir)/jar.stamp', | 55 'stamp': '<(intermediate_dir)/jar.stamp', |
56 'disable_errorprone%': '0', | |
jbudorick
2015/05/15 18:37:12
nit: rename as enable_errorprone
raywilliams_chromium
2015/05/18 19:53:24
Done.
| |
57 'errorprone_exe_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone', | |
56 }, | 58 }, |
57 'all_dependent_settings': { | 59 'all_dependent_settings': { |
58 'variables': { | 60 'variables': { |
59 'input_jars_paths': ['<(jar_path)'] | 61 'input_jars_paths': ['<(jar_path)'] |
60 }, | 62 }, |
61 }, | 63 }, |
62 'actions': [ | 64 'actions': [ |
63 { | 65 { |
64 'action_name': 'javac_<(_target_name)', | 66 'action_name': 'javac_<(_target_name)', |
65 'message': 'Compiling <(_target_name) java sources', | 67 'message': 'Compiling <(_target_name) java sources', |
66 'variables': { | 68 'variables': { |
67 'extra_options': [], | 69 'extra_options': [], |
68 'java_sources': [ '<!@(find <@(src_paths) -name "*.java")' ], | 70 'java_sources': [ '<!@(find <@(src_paths) -name "*.java")' ], |
69 'conditions': [ | 71 'conditions': [ |
70 ['"<(excluded_src_paths)" != ""', { | 72 ['"<(excluded_src_paths)" != ""', { |
71 'java_sources!': ['<!@(find <@(excluded_src_paths) -name "*.java")'] | 73 'java_sources!': ['<!@(find <@(excluded_src_paths) -name "*.java")'] |
72 }], | 74 }], |
73 ['"<(jar_excluded_classes)" != ""', { | 75 ['"<(jar_excluded_classes)" != ""', { |
74 'extra_options': ['--jar-excluded-classes=<(jar_excluded_classes)'] | 76 'extra_options': ['--jar-excluded-classes=<(jar_excluded_classes)'] |
75 }], | 77 }], |
76 ['main_class != ""', { | 78 ['main_class != ""', { |
77 'extra_options': ['--main-class=>(main_class)'] | 79 'extra_options': ['--main-class=>(main_class)'] |
78 }] | 80 }], |
81 ['disable_errorprone == 0', { | |
jbudorick
2015/05/15 18:37:12
er... if disable_errorprone is 0, you're passing -
raywilliams_chromium
2015/05/18 19:53:24
Fixed
raywilliams_chromium
2015/05/18 19:53:24
Done.
| |
82 'extra_inputs': [ | |
83 '<(errorprone_exe_path)', | |
84 ], | |
85 'extra_options': [ '--errorprone-path=<(errorprone_exe_path)' ], | |
86 }, { | |
87 'extra_inputs': [], | |
88 'extra_options': [ '--enable-errorprone' ], | |
89 }], | |
79 ], | 90 ], |
80 }, | 91 }, |
81 'inputs': [ | 92 'inputs': [ |
82 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 93 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
83 '<(DEPTH)/build/android/gyp/javac.py', | 94 '<(DEPTH)/build/android/gyp/javac.py', |
84 '^@(java_sources)', | 95 '^@(java_sources)', |
85 '>@(input_jars_paths)', | 96 '>@(input_jars_paths)', |
97 '<@(extra_inputs)', | |
86 ], | 98 ], |
87 'outputs': [ | 99 'outputs': [ |
88 '<(jar_path)', | 100 '<(jar_path)', |
89 '<(stamp)', | 101 '<(stamp)', |
90 ], | 102 ], |
91 'action': [ | 103 'action': [ |
92 'python', '<(DEPTH)/build/android/gyp/javac.py', | 104 'python', '<(DEPTH)/build/android/gyp/javac.py', |
93 '--classpath=>(input_jars_paths)', | 105 '--classpath=>(input_jars_paths)', |
94 '--src-gendirs=>(generated_src_dirs)', | 106 '--src-gendirs=>(generated_src_dirs)', |
95 '--chromium-code=<(chromium_code)', | 107 '--chromium-code=<(chromium_code)', |
(...skipping 26 matching lines...) Expand all Loading... | |
122 '--jar-path=<(jar_path)', | 134 '--jar-path=<(jar_path)', |
123 '--output=<(output)', | 135 '--output=<(output)', |
124 '--main-class=>(main_class)', | 136 '--main-class=>(main_class)', |
125 ] | 137 ] |
126 } | 138 } |
127 ] | 139 ] |
128 }] | 140 }] |
129 ] | 141 ] |
130 } | 142 } |
131 | 143 |
OLD | NEW |