| 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 'enable_errorprone%': '0', |
| 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 ['enable_errorprone == 1', { |
| 82 'extra_inputs': [ |
| 83 '<(errorprone_exe_path)', |
| 84 ], |
| 85 'extra_options': [ '--use-errorprone-path=<(errorprone_exe_path)' ], |
| 86 }], |
| 79 ], | 87 ], |
| 80 }, | 88 }, |
| 81 'inputs': [ | 89 'inputs': [ |
| 82 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 90 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 83 '<(DEPTH)/build/android/gyp/javac.py', | 91 '<(DEPTH)/build/android/gyp/javac.py', |
| 84 '^@(java_sources)', | 92 '^@(java_sources)', |
| 85 '>@(input_jars_paths)', | 93 '>@(input_jars_paths)', |
| 94 '<@(extra_inputs)', |
| 86 ], | 95 ], |
| 87 'outputs': [ | 96 'outputs': [ |
| 88 '<(jar_path)', | 97 '<(jar_path)', |
| 89 '<(stamp)', | 98 '<(stamp)', |
| 90 ], | 99 ], |
| 91 'action': [ | 100 'action': [ |
| 92 'python', '<(DEPTH)/build/android/gyp/javac.py', | 101 'python', '<(DEPTH)/build/android/gyp/javac.py', |
| 93 '--classpath=>(input_jars_paths)', | 102 '--classpath=>(input_jars_paths)', |
| 94 '--src-gendirs=>(generated_src_dirs)', | 103 '--src-gendirs=>(generated_src_dirs)', |
| 95 '--chromium-code=<(chromium_code)', | 104 '--chromium-code=<(chromium_code)', |
| (...skipping 26 matching lines...) Expand all Loading... |
| 122 '--jar-path=<(jar_path)', | 131 '--jar-path=<(jar_path)', |
| 123 '--output=<(output)', | 132 '--output=<(output)', |
| 124 '--main-class=>(main_class)', | 133 '--main-class=>(main_class)', |
| 125 ] | 134 ] |
| 126 } | 135 } |
| 127 ] | 136 ] |
| 128 }] | 137 }] |
| 129 ] | 138 ] |
| 130 } | 139 } |
| 131 | 140 |
| OLD | NEW |