2012-04-17 08:39:52 +04:00
|
|
|
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
# This file is meant to be included into a target to provide a rule
|
|
|
|
# to build Java in a consistent manner.
|
|
|
|
#
|
|
|
|
# To use this, create a gyp target with the following form:
|
|
|
|
# {
|
|
|
|
# 'target_name': 'my-package_java',
|
|
|
|
# 'type': 'none',
|
|
|
|
# 'variables': {
|
|
|
|
# 'java_in_dir': 'path/to/package/root',
|
|
|
|
# },
|
|
|
|
# 'includes': ['path/to/this/gypi/file'],
|
|
|
|
# }
|
|
|
|
#
|
2012-09-28 22:22:29 +04:00
|
|
|
# Required variables:
|
|
|
|
# java_in_dir - The top-level java directory. The src should be in
|
|
|
|
# <java_in_dir>/src.
|
|
|
|
# Optional/automatic variables:
|
2014-10-17 14:35:42 +04:00
|
|
|
# add_to_dependents_classpaths - Set to 0 if the resulting jar file should not
|
|
|
|
# be added to its dependents' classpaths.
|
2012-09-28 22:22:29 +04:00
|
|
|
# additional_input_paths - These paths will be included in the 'inputs' list to
|
|
|
|
# ensure that this target is rebuilt when one of these paths changes.
|
|
|
|
# additional_src_dirs - Additional directories with .java files to be compiled
|
|
|
|
# and included in the output of this target.
|
|
|
|
# generated_src_dirs - Same as additional_src_dirs except used for .java files
|
|
|
|
# that are generated at build time. This should be set automatically by a
|
|
|
|
# target's dependencies. The .java files in these directories are not
|
|
|
|
# included in the 'inputs' list (unlike additional_src_dirs).
|
|
|
|
# input_jars_paths - The path to jars to be included in the classpath. This
|
|
|
|
# should be filled automatically by depending on the appropriate targets.
|
2012-11-15 01:20:47 +04:00
|
|
|
# javac_includes - A list of specific files to include. This is by default
|
2012-11-14 05:23:40 +04:00
|
|
|
# empty, which leads to inclusion of all files specified. May include
|
|
|
|
# wildcard, and supports '**/' for recursive path wildcards, ie.:
|
|
|
|
# '**/MyFileRegardlessOfDirectory.java', '**/IncludedPrefix*.java'.
|
2012-11-17 00:39:20 +04:00
|
|
|
# has_java_resources - Set to 1 if the java target contains an
|
|
|
|
# Android-compatible resources folder named res. If 1, R_package and
|
|
|
|
# R_package_relpath must also be set.
|
|
|
|
# R_package - The java package in which the R class (which maps resources to
|
|
|
|
# integer IDs) should be generated, e.g. org.chromium.content.
|
|
|
|
# R_package_relpath - Same as R_package, but replace each '.' with '/'.
|
2013-03-26 11:31:57 +04:00
|
|
|
# res_extra_dirs - A list of extra directories containing Android resources.
|
|
|
|
# These directories may be generated at build time.
|
|
|
|
# res_extra_files - A list of the files in res_extra_dirs.
|
2013-12-11 07:02:10 +04:00
|
|
|
# never_lint - Set to 1 to not run lint on this target.
|
2012-04-17 08:39:52 +04:00
|
|
|
|
|
|
|
{
|
2012-09-19 22:19:18 +04:00
|
|
|
'dependencies': [
|
2013-04-03 22:20:22 +04:00
|
|
|
'<(DEPTH)/build/android/setup.gyp:build_output_dirs'
|
2012-09-19 22:19:18 +04:00
|
|
|
],
|
2012-08-09 22:08:19 +04:00
|
|
|
'variables': {
|
2014-10-17 14:35:42 +04:00
|
|
|
'add_to_dependents_classpaths%': 1,
|
2013-03-23 22:38:32 +04:00
|
|
|
'android_jar': '<(android_sdk)/android.jar',
|
|
|
|
'input_jars_paths': [ '<(android_jar)' ],
|
2012-08-13 22:35:49 +04:00
|
|
|
'additional_src_dirs': [],
|
2012-11-14 05:23:40 +04:00
|
|
|
'javac_includes': [],
|
2013-02-21 02:39:17 +04:00
|
|
|
'jar_name': '<(_target_name).jar',
|
2013-08-22 04:08:31 +04:00
|
|
|
'jar_dir': '<(PRODUCT_DIR)/lib.java',
|
|
|
|
'jar_path': '<(intermediate_dir)/<(jar_name)',
|
|
|
|
'jar_final_path': '<(jar_dir)/<(jar_name)',
|
2013-03-27 00:44:29 +04:00
|
|
|
'jar_excluded_classes': [ '*/R.class', '*/R##*.class' ],
|
2015-10-14 00:46:29 +03:00
|
|
|
'emma_instr_stamp': '<(intermediate_dir)/emma_instr.stamp',
|
2013-03-23 22:38:32 +04:00
|
|
|
'additional_input_paths': [],
|
2015-09-29 01:50:11 +03:00
|
|
|
'additional_locale_input_paths': [],
|
2013-03-28 03:31:27 +04:00
|
|
|
'dex_path': '<(PRODUCT_DIR)/lib.java/<(_target_name).dex.jar',
|
2012-11-17 00:39:20 +04:00
|
|
|
'generated_src_dirs': ['>@(generated_R_dirs)'],
|
|
|
|
'generated_R_dirs': [],
|
|
|
|
'has_java_resources%': 0,
|
2013-03-26 11:31:57 +04:00
|
|
|
'res_extra_dirs': [],
|
|
|
|
'res_extra_files': [],
|
2015-05-15 01:17:59 +03:00
|
|
|
'res_v14_skip%': 0,
|
2013-03-26 11:31:57 +04:00
|
|
|
'resource_input_paths': ['>@(res_extra_files)'],
|
2013-03-16 20:25:22 +04:00
|
|
|
'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)',
|
|
|
|
'compile_stamp': '<(intermediate_dir)/compile.stamp',
|
2013-12-11 07:02:10 +04:00
|
|
|
'lint_stamp': '<(intermediate_dir)/lint.stamp',
|
|
|
|
'lint_result': '<(intermediate_dir)/lint_result.xml',
|
|
|
|
'lint_config': '<(intermediate_dir)/lint_config.xml',
|
|
|
|
'never_lint%': 0,
|
2015-03-24 06:14:39 +03:00
|
|
|
'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp',
|
|
|
|
'run_findbugs%': 0,
|
2015-07-11 02:51:02 +03:00
|
|
|
'java_in_dir_suffix%': '/src',
|
2013-08-15 04:12:07 +04:00
|
|
|
'proguard_config%': '',
|
|
|
|
'proguard_preprocess%': '0',
|
|
|
|
'variables': {
|
|
|
|
'variables': {
|
|
|
|
'proguard_preprocess%': 0,
|
2013-08-24 07:25:14 +04:00
|
|
|
'emma_never_instrument%': 0,
|
2013-08-15 04:12:07 +04:00
|
|
|
},
|
|
|
|
'conditions': [
|
|
|
|
['proguard_preprocess == 1', {
|
|
|
|
'javac_jar_path': '<(intermediate_dir)/<(_target_name).pre.jar'
|
|
|
|
}, {
|
2013-08-22 04:08:31 +04:00
|
|
|
'javac_jar_path': '<(jar_path)'
|
2013-08-15 04:12:07 +04:00
|
|
|
}],
|
2013-08-24 07:25:14 +04:00
|
|
|
['chromium_code != 0 and emma_coverage != 0 and emma_never_instrument == 0', {
|
|
|
|
'emma_instrument': 1,
|
|
|
|
}, {
|
|
|
|
'emma_instrument': 0,
|
|
|
|
}],
|
2013-08-15 04:12:07 +04:00
|
|
|
],
|
|
|
|
},
|
2013-08-24 07:25:14 +04:00
|
|
|
'emma_instrument': '<(emma_instrument)',
|
2013-08-15 04:12:07 +04:00
|
|
|
'javac_jar_path': '<(javac_jar_path)',
|
2015-08-27 22:15:02 +03:00
|
|
|
'conditions': [
|
|
|
|
['chromium_code == 0', {
|
|
|
|
'enable_errorprone': 0,
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
'enable_errorprone%': 0,
|
|
|
|
'errorprone_exe_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone',
|
2012-08-09 22:08:19 +04:00
|
|
|
},
|
2012-11-17 00:39:20 +04:00
|
|
|
'conditions': [
|
2014-10-17 14:35:42 +04:00
|
|
|
['add_to_dependents_classpaths == 1', {
|
|
|
|
# This all_dependent_settings is used for java targets only. This will add the
|
|
|
|
# jar path to the classpath of dependent java targets.
|
|
|
|
'all_dependent_settings': {
|
|
|
|
'variables': {
|
|
|
|
'input_jars_paths': ['<(jar_final_path)'],
|
|
|
|
'library_dexed_jars_paths': ['<(dex_path)'],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}],
|
2012-11-17 00:39:20 +04:00
|
|
|
['has_java_resources == 1', {
|
|
|
|
'variables': {
|
2015-02-26 03:09:07 +03:00
|
|
|
'resource_dir': '<(java_in_dir)/res',
|
|
|
|
'res_input_dirs': ['<(resource_dir)', '<@(res_extra_dirs)'],
|
|
|
|
'resource_input_paths': ['<!@(find <(resource_dir) -type f)'],
|
2014-06-11 05:20:55 +04:00
|
|
|
|
2013-03-16 20:25:22 +04:00
|
|
|
'R_dir': '<(intermediate_dir)/java_R',
|
2013-01-11 03:33:38 +04:00
|
|
|
'R_text_file': '<(R_dir)/R.txt',
|
2014-06-11 05:20:55 +04:00
|
|
|
|
2012-11-17 00:39:20 +04:00
|
|
|
'generated_src_dirs': ['<(R_dir)'],
|
2014-06-11 05:20:55 +04:00
|
|
|
'additional_input_paths': ['<(resource_zip_path)', ],
|
|
|
|
|
2015-09-29 01:50:11 +03:00
|
|
|
'dependencies_locale_zip_paths': [],
|
2014-06-11 05:20:55 +04:00
|
|
|
'dependencies_res_zip_paths': [],
|
|
|
|
'resource_zip_path': '<(PRODUCT_DIR)/res.java/<(_target_name).zip',
|
2012-11-17 00:39:20 +04:00
|
|
|
},
|
|
|
|
'all_dependent_settings': {
|
|
|
|
'variables': {
|
2014-06-11 05:20:55 +04:00
|
|
|
# Dependent libraries include this target's R.java file via
|
|
|
|
# generated_R_dirs.
|
2012-11-17 00:39:20 +04:00
|
|
|
'generated_R_dirs': ['<(R_dir)'],
|
|
|
|
|
2014-06-11 05:20:55 +04:00
|
|
|
# Dependent libraries and apks include this target's resources via
|
|
|
|
# dependencies_res_zip_paths.
|
|
|
|
'additional_input_paths': ['<(resource_zip_path)'],
|
|
|
|
'dependencies_res_zip_paths': ['<(resource_zip_path)'],
|
2013-05-04 19:47:16 +04:00
|
|
|
|
2014-06-11 05:20:55 +04:00
|
|
|
# additional_res_packages and additional_R_text_files are used to
|
|
|
|
# create this packages R.java files when building the APK.
|
2012-11-17 00:39:20 +04:00
|
|
|
'additional_res_packages': ['<(R_package)'],
|
2013-03-26 11:31:57 +04:00
|
|
|
'additional_R_text_files': ['<(R_text_file)'],
|
2012-11-17 00:39:20 +04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'actions': [
|
2014-01-08 04:05:19 +04:00
|
|
|
# Generate R.java and crunch image resources.
|
2012-11-17 00:39:20 +04:00
|
|
|
{
|
2012-12-13 01:01:08 +04:00
|
|
|
'action_name': 'process_resources',
|
2013-02-21 02:39:17 +04:00
|
|
|
'message': 'processing resources for <(_target_name)',
|
2013-03-23 22:38:32 +04:00
|
|
|
'variables': {
|
|
|
|
'android_manifest': '<(DEPTH)/build/android/AndroidManifest.xml',
|
2014-03-17 21:59:47 +04:00
|
|
|
# Write the inputs list to a file, so that its mtime is updated when
|
|
|
|
# the list of inputs changes.
|
2014-06-11 05:20:55 +04:00
|
|
|
'inputs_list_file': '>|(java_resources.<(_target_name).gypcmd >@(resource_input_paths))',
|
2014-06-07 12:28:03 +04:00
|
|
|
'process_resources_options': [],
|
2015-09-29 01:50:11 +03:00
|
|
|
'local_dependencies_res_zip_paths': [
|
|
|
|
'>@(dependencies_res_zip_paths)',
|
|
|
|
'>@(dependencies_locale_zip_paths)'
|
|
|
|
],
|
2014-06-07 12:28:03 +04:00
|
|
|
'conditions': [
|
2015-05-15 01:17:59 +03:00
|
|
|
['res_v14_skip == 1', {
|
|
|
|
'process_resources_options': ['--v14-skip']
|
|
|
|
}],
|
2014-06-07 12:28:03 +04:00
|
|
|
],
|
2013-03-23 22:38:32 +04:00
|
|
|
},
|
2012-11-17 00:39:20 +04:00
|
|
|
'inputs': [
|
2013-04-05 03:04:40 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/util/build_utils.py',
|
|
|
|
'<(DEPTH)/build/android/gyp/process_resources.py',
|
2014-06-07 12:28:03 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/generate_v14_compatible_resources.py',
|
2013-03-26 11:31:57 +04:00
|
|
|
'>@(resource_input_paths)',
|
2015-09-29 01:50:11 +03:00
|
|
|
'>@(local_dependencies_res_zip_paths)',
|
2014-03-17 21:59:47 +04:00
|
|
|
'>(inputs_list_file)',
|
2012-11-17 00:39:20 +04:00
|
|
|
],
|
|
|
|
'outputs': [
|
2014-06-11 05:20:55 +04:00
|
|
|
'<(resource_zip_path)',
|
2012-11-17 00:39:20 +04:00
|
|
|
],
|
|
|
|
'action': [
|
2013-04-05 03:04:40 +04:00
|
|
|
'python', '<(DEPTH)/build/android/gyp/process_resources.py',
|
2016-01-14 05:28:38 +03:00
|
|
|
'--android-sdk-jar', '<(android_sdk_jar)',
|
2015-06-05 02:28:26 +03:00
|
|
|
'--aapt-path', '<(android_aapt_path)',
|
2015-09-19 00:01:08 +03:00
|
|
|
# Need to generate onResourcesLoaded() in R.java, so could be used in java lib.
|
|
|
|
'--shared-resources',
|
2014-06-11 05:20:55 +04:00
|
|
|
|
|
|
|
'--android-manifest', '<(android_manifest)',
|
2013-03-23 22:38:32 +04:00
|
|
|
'--custom-package', '<(R_package)',
|
2014-06-11 05:20:55 +04:00
|
|
|
|
2015-09-29 01:50:11 +03:00
|
|
|
'--dependencies-res-zips', '>(local_dependencies_res_zip_paths)',
|
2014-06-11 05:20:55 +04:00
|
|
|
'--resource-dirs', '<(res_input_dirs)',
|
|
|
|
|
|
|
|
'--R-dir', '<(R_dir)',
|
|
|
|
'--resource-zip-out', '<(resource_zip_path)',
|
|
|
|
|
2014-06-07 12:28:03 +04:00
|
|
|
'<@(process_resources_options)',
|
2012-11-17 00:39:20 +04:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}],
|
2013-08-15 04:12:07 +04:00
|
|
|
['proguard_preprocess == 1', {
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'proguard_<(_target_name)',
|
|
|
|
'message': 'Proguard preprocessing <(_target_name) jar',
|
|
|
|
'inputs': [
|
2015-08-28 01:23:02 +03:00
|
|
|
'<(DEPTH)/third_party/proguard/lib/proguard.jar',
|
2013-08-15 04:12:07 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/util/build_utils.py',
|
|
|
|
'<(DEPTH)/build/android/gyp/proguard.py',
|
|
|
|
'<(javac_jar_path)',
|
|
|
|
'<(proguard_config)',
|
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(jar_path)',
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'python', '<(DEPTH)/build/android/gyp/proguard.py',
|
2015-08-28 01:23:02 +03:00
|
|
|
'--proguard-path=<(DEPTH)/third_party/proguard/lib/proguard.jar',
|
2013-08-15 04:12:07 +04:00
|
|
|
'--input-path=<(javac_jar_path)',
|
|
|
|
'--output-path=<(jar_path)',
|
|
|
|
'--proguard-config=<(proguard_config)',
|
|
|
|
'--classpath=<(android_sdk_jar) >(input_jars_paths)',
|
|
|
|
]
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}],
|
2015-03-24 06:14:39 +03:00
|
|
|
['run_findbugs == 1', {
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'findbugs_<(_target_name)',
|
|
|
|
'message': 'Running findbugs on <(_target_name)',
|
2015-08-23 02:33:16 +03:00
|
|
|
'variables': {
|
|
|
|
'additional_findbugs_args': [],
|
|
|
|
'findbugs_verbose%': 0,
|
|
|
|
},
|
|
|
|
'conditions': [
|
|
|
|
['findbugs_verbose == 1', {
|
|
|
|
'variables': {
|
|
|
|
'additional_findbugs_args+': ['-vv'],
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
],
|
2015-03-24 06:14:39 +03:00
|
|
|
'inputs': [
|
|
|
|
'<(DEPTH)/build/android/findbugs_diff.py',
|
|
|
|
'<(DEPTH)/build/android/findbugs_filter/findbugs_exclude.xml',
|
|
|
|
'<(DEPTH)/build/android/pylib/utils/findbugs.py',
|
|
|
|
'>@(input_jars_paths)',
|
|
|
|
'<(jar_final_path)',
|
|
|
|
'<(compile_stamp)',
|
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(findbugs_stamp)',
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'python', '<(DEPTH)/build/android/findbugs_diff.py',
|
|
|
|
'--auxclasspath-gyp', '>(input_jars_paths)',
|
|
|
|
'--stamp', '<(findbugs_stamp)',
|
2015-08-23 02:33:16 +03:00
|
|
|
'<@(additional_findbugs_args)',
|
2015-03-24 06:14:39 +03:00
|
|
|
'<(jar_final_path)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}],
|
2015-06-22 19:17:37 +03:00
|
|
|
['enable_errorprone == 1', {
|
|
|
|
'dependencies': [
|
2015-08-27 00:47:28 +03:00
|
|
|
'<(DEPTH)/third_party/errorprone/errorprone.gyp:require_errorprone',
|
2015-06-22 19:17:37 +03:00
|
|
|
],
|
|
|
|
}],
|
2012-11-17 00:39:20 +04:00
|
|
|
],
|
2012-04-17 08:39:52 +04:00
|
|
|
'actions': [
|
|
|
|
{
|
2013-03-16 20:25:22 +04:00
|
|
|
'action_name': 'javac_<(_target_name)',
|
|
|
|
'message': 'Compiling <(_target_name) java sources',
|
|
|
|
'variables': {
|
2015-09-29 01:50:11 +03:00
|
|
|
'local_additional_input_paths': [
|
|
|
|
'>@(additional_input_paths)',
|
|
|
|
'>@(additional_locale_input_paths)',
|
|
|
|
],
|
2015-06-22 19:17:37 +03:00
|
|
|
'extra_args': [],
|
|
|
|
'extra_inputs': [],
|
2015-07-11 02:51:02 +03:00
|
|
|
'java_sources': ['>!@(find >(java_in_dir)>(java_in_dir_suffix) >(additional_src_dirs) -name "*.java")'],
|
2015-06-22 19:17:37 +03:00
|
|
|
'conditions': [
|
|
|
|
['enable_errorprone == 1', {
|
|
|
|
'extra_inputs': [
|
|
|
|
'<(errorprone_exe_path)',
|
|
|
|
],
|
|
|
|
'extra_args': [ '--use-errorprone-path=<(errorprone_exe_path)' ],
|
|
|
|
}],
|
|
|
|
],
|
2013-03-16 20:25:22 +04:00
|
|
|
},
|
2012-04-17 08:39:52 +04:00
|
|
|
'inputs': [
|
2013-04-05 03:04:40 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/util/build_utils.py',
|
2013-04-04 13:35:50 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/javac.py',
|
2014-03-13 19:47:16 +04:00
|
|
|
'>@(java_sources)',
|
2012-08-09 22:08:19 +04:00
|
|
|
'>@(input_jars_paths)',
|
2015-09-29 01:50:11 +03:00
|
|
|
'>@(local_additional_input_paths)',
|
2015-06-22 19:17:37 +03:00
|
|
|
'<@(extra_inputs)',
|
2012-04-17 08:39:52 +04:00
|
|
|
],
|
|
|
|
'outputs': [
|
2013-03-16 20:25:22 +04:00
|
|
|
'<(compile_stamp)',
|
2014-06-23 22:42:13 +04:00
|
|
|
'<(javac_jar_path)',
|
2012-04-17 08:39:52 +04:00
|
|
|
],
|
|
|
|
'action': [
|
2013-04-04 13:35:50 +04:00
|
|
|
'python', '<(DEPTH)/build/android/gyp/javac.py',
|
2015-07-08 16:09:05 +03:00
|
|
|
'--bootclasspath=<(android_sdk_jar)',
|
2013-03-16 20:25:22 +04:00
|
|
|
'--classpath=>(input_jars_paths)',
|
android: Pass (non-generated) .java files via a gyp filelist to javac.py
Before this CL, the javac action rules called `find javadir -name "*.java"` to
compute the action's inputs, and passed javadir to javac.py. The script then
again looked for all .java files in that directory. One issue with that approach
is that if a java file gets removed, the javac.py action didn't get executed again
since actions are only run if their commandline changes or an input file is newer
than an output file – a disappearing input doesn't mark an action dirty. (As
workaround, the md5 hash of all .java files is currently passed in an
--ignore parameter, so removal of a java file will lead to a changing
commandline, which _will_ cause a rebuild.)
After this CL, the result of `find javadir -name "*.java"` is written to a gyp
filelist (see https://codereview.chromium.org/27418008/), and the filelist
is passed to javac.py. gyp writes filelists exactly if their contents would
change, so removal of java file will change the mtime of the filelist, which will
cause a rebuild. Another advantage is that the list of java files is computed in
only one place.
This CL doesn't yet remove the md5 hack, but it makes it possible to do so
in a follow-up change.
(This approach doesn't work for generated java files, because these might
not yet exist at gyp time. Rename --src-dirs to --src-gendirs and keep it in
use for generated files. The dependency handling of generated java files is
done through stamp files, so the md5 hack isn't needed for them.)
No intended behavior change.
BUG=177552
R=cjhopman@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256097
Review URL: https://codereview.chromium.org/193693002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@256667 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-13 01:56:41 +04:00
|
|
|
'--src-gendirs=>(generated_src_dirs)',
|
2013-03-16 20:25:22 +04:00
|
|
|
'--javac-includes=<(javac_includes)',
|
2013-04-02 03:52:40 +04:00
|
|
|
'--chromium-code=<(chromium_code)',
|
2014-06-23 22:42:13 +04:00
|
|
|
'--jar-path=<(javac_jar_path)',
|
|
|
|
'--jar-excluded-classes=<(jar_excluded_classes)',
|
2013-03-16 20:25:22 +04:00
|
|
|
'--stamp=<(compile_stamp)',
|
2014-03-17 22:23:12 +04:00
|
|
|
'>@(java_sources)',
|
2015-06-22 19:17:37 +03:00
|
|
|
'<@(extra_args)',
|
2013-03-16 20:25:22 +04:00
|
|
|
]
|
|
|
|
},
|
2014-08-12 19:10:38 +04:00
|
|
|
{
|
2015-10-14 00:46:29 +03:00
|
|
|
'action_name': 'emma_instr_jar_<(_target_name)',
|
2014-08-12 19:10:38 +04:00
|
|
|
'message': 'Instrumenting <(_target_name) jar',
|
|
|
|
'variables': {
|
|
|
|
'input_path': '<(jar_path)',
|
|
|
|
'output_path': '<(jar_final_path)',
|
2015-11-18 21:54:00 +03:00
|
|
|
'coverage_file': '<(jar_dir)/<(_target_name).em',
|
|
|
|
'sources_list_file': '<(jar_dir)/<(_target_name)_sources.txt',
|
2015-10-14 00:46:29 +03:00
|
|
|
'stamp_path': '<(emma_instr_stamp)',
|
2014-08-12 19:10:38 +04:00
|
|
|
},
|
|
|
|
'outputs': [
|
|
|
|
'<(jar_final_path)',
|
|
|
|
],
|
|
|
|
'inputs': [
|
|
|
|
'<(jar_path)',
|
|
|
|
],
|
2015-10-14 00:46:29 +03:00
|
|
|
'includes': [ 'android/emma_instr_action.gypi' ],
|
2014-08-12 19:10:38 +04:00
|
|
|
},
|
2013-12-11 07:02:10 +04:00
|
|
|
{
|
|
|
|
'variables': {
|
|
|
|
'src_dirs': [
|
2015-07-11 02:51:02 +03:00
|
|
|
'<(java_in_dir)<(java_in_dir_suffix)',
|
2013-12-11 07:02:10 +04:00
|
|
|
'>@(additional_src_dirs)',
|
|
|
|
],
|
|
|
|
'stamp_path': '<(lint_stamp)',
|
|
|
|
'result_path': '<(lint_result)',
|
|
|
|
'config_path': '<(lint_config)',
|
2014-08-12 19:10:38 +04:00
|
|
|
'lint_jar_path': '<(jar_final_path)',
|
2013-12-11 07:02:10 +04:00
|
|
|
},
|
|
|
|
'inputs': [
|
2014-08-12 19:10:38 +04:00
|
|
|
'<(jar_final_path)',
|
2013-12-11 07:02:10 +04:00
|
|
|
'<(compile_stamp)',
|
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(lint_stamp)',
|
|
|
|
],
|
|
|
|
'includes': [ 'android/lint_action.gypi' ],
|
|
|
|
},
|
2013-04-13 06:49:36 +04:00
|
|
|
{
|
|
|
|
'action_name': 'jar_toc_<(_target_name)',
|
|
|
|
'message': 'Creating <(_target_name) jar.TOC',
|
|
|
|
'inputs': [
|
|
|
|
'<(DEPTH)/build/android/gyp/util/build_utils.py',
|
|
|
|
'<(DEPTH)/build/android/gyp/util/md5_check.py',
|
|
|
|
'<(DEPTH)/build/android/gyp/jar_toc.py',
|
2013-08-22 04:08:31 +04:00
|
|
|
'<(jar_final_path)',
|
2013-04-13 06:49:36 +04:00
|
|
|
],
|
|
|
|
'outputs': [
|
2013-08-22 04:08:31 +04:00
|
|
|
'<(jar_final_path).TOC',
|
2013-04-13 06:49:36 +04:00
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'python', '<(DEPTH)/build/android/gyp/jar_toc.py',
|
2013-08-22 04:08:31 +04:00
|
|
|
'--jar-path=<(jar_final_path)',
|
|
|
|
'--toc-path=<(jar_final_path).TOC',
|
2013-04-13 06:49:36 +04:00
|
|
|
]
|
|
|
|
},
|
2013-03-28 03:31:27 +04:00
|
|
|
{
|
|
|
|
'action_name': 'dex_<(_target_name)',
|
2013-05-18 06:33:37 +04:00
|
|
|
'variables': {
|
2013-08-22 04:08:31 +04:00
|
|
|
'conditions': [
|
|
|
|
['emma_instrument != 0', {
|
|
|
|
'dex_no_locals': 1,
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
'dex_input_paths': [ '<(jar_final_path)' ],
|
2013-05-18 06:33:37 +04:00
|
|
|
'output_path': '<(dex_path)',
|
|
|
|
},
|
|
|
|
'includes': [ 'android/dex_action.gypi' ],
|
2013-03-28 03:31:27 +04:00
|
|
|
},
|
2012-04-17 08:39:52 +04:00
|
|
|
],
|
|
|
|
}
|