diff options
-rw-r--r-- | android_webview/android_webview_tests.gypi | 14 | ||||
-rw-r--r-- | build/apk_fake_jar.gypi | 25 | ||||
-rw-r--r-- | build/java.gypi | 25 | ||||
-rw-r--r-- | build/java_apk.gypi | 3 | ||||
-rw-r--r-- | chrome/chrome_android.gypi | 18 | ||||
-rw-r--r-- | content/content_shell.gypi | 19 |
6 files changed, 55 insertions, 49 deletions
diff --git a/android_webview/android_webview_tests.gypi b/android_webview/android_webview_tests.gypi index 09ebb89..b8a73af 100644 --- a/android_webview/android_webview_tests.gypi +++ b/android_webview/android_webview_tests.gypi @@ -44,19 +44,7 @@ 'dependencies': [ 'android_webview_apk', ], - 'all_dependent_settings': { - 'variables': { - 'input_jars_paths': ['>(apk_output_jar_path)'], - }, - }, - 'actions': [ - { - 'action_name': 'fake_generate_jar', - 'inputs': [], - 'outputs': ['>(apk_output_jar_path)'], - 'action': [], - }, - ], + 'includes': [ '../build/apk_fake_jar.gypi' ], }, { 'target_name': 'android_webview_test_apk', diff --git a/build/apk_fake_jar.gypi b/build/apk_fake_jar.gypi new file mode 100644 index 0000000..2787691 --- /dev/null +++ b/build/apk_fake_jar.gypi @@ -0,0 +1,25 @@ +# Copyright 2013 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. + +{ + 'all_dependent_settings': { + 'variables': { + 'input_jars_paths': ['>(apk_output_jar_path)'], + 'library_dexed_jars_paths': ['>(apk_output_jar_path)'], + }, + }, + # Add an action with the appropriate output. This allows the generated + # buildfiles to determine which target the output corresponds to. + 'actions': [ + { + 'action_name': 'fake_generate_jar', + 'inputs': [], + 'outputs': ['>(apk_output_jar_path)'], + 'action': [], + }, + ], +} diff --git a/build/java.gypi b/build/java.gypi index c1d5911..f3bc01e 100644 --- a/build/java.gypi +++ b/build/java.gypi @@ -58,6 +58,7 @@ 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', 'jar_excluded_classes': [ '*/R.class', '*/R##*.class' ], 'additional_input_paths': [], + 'dex_path': '<(PRODUCT_DIR)/lib.java/<(_target_name).dex.jar', 'generated_src_dirs': ['>@(generated_R_dirs)'], 'generated_R_dirs': [], 'has_java_resources%': 0, @@ -74,6 +75,7 @@ 'all_dependent_settings': { 'variables': { 'input_jars_paths': ['<(jar_path)'], + 'library_dexed_jars_paths': ['<(dex_path)'], }, }, 'conditions': [ @@ -226,5 +228,28 @@ '--ignore=>!(echo \'>(_inputs)\' | md5sum)', ] }, + { + 'action_name': 'dex_<(_target_name)', + 'message': 'Dexing <(_target_name) jar', + 'inputs': [ + '<(DEPTH)/build/android/pylib/build_utils.py', + '<(DEPTH)/build/android/dex.py', + '<(jar_path)', + ], + 'outputs': [ + '<(dex_path)', + ], + 'action': [ + 'python', '<(DEPTH)/build/android/dex.py', + '--dex-path=<(dex_path)', + '--android-sdk-root=<(android_sdk_root)', + + # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja. + '--ignore=>!(echo >(_inputs) | md5sum)', + + '<(jar_path)', + ] + }, + ], } diff --git a/build/java_apk.gypi b/build/java_apk.gypi index c42f969..bfe8d9c 100644 --- a/build/java_apk.gypi +++ b/build/java_apk.gypi @@ -53,6 +53,7 @@ 'variables': { 'additional_input_paths': [], 'input_jars_paths': [], + 'library_dexed_jars_paths': [], 'additional_src_dirs': [], 'generated_src_dirs': [], 'app_manifest_version_name%': '<(android_app_version_name)', @@ -312,7 +313,7 @@ 'dex_generated_inputs': [], }, { 'dex_inputs': [ - '>@(input_jars_paths)', + '>@(library_dexed_jars_paths)', ], 'dex_generated_inputs': [ '<(classes_dir)', diff --git a/chrome/chrome_android.gypi b/chrome/chrome_android.gypi index 1af9aec..1118407 100644 --- a/chrome/chrome_android.gypi +++ b/chrome/chrome_android.gypi @@ -78,23 +78,7 @@ 'dependencies': [ 'chromium_testshell', ], - # This all_dependent_settings is used for java targets only. This will add - # the chromium_testshell jar to the classpath of dependent java targets. - 'all_dependent_settings': { - 'variables': { - 'input_jars_paths': ['>(apk_output_jar_path)'], - }, - }, - # Add an action with the appropriate output. This allows the generated - # buildfiles to determine which target the output corresponds to. - 'actions': [ - { - 'action_name': 'fake_generate_jar', - 'inputs': [], - 'outputs': ['>(apk_output_jar_path)'], - 'action': [], - }, - ], + 'includes': [ '../build/apk_fake_jar.gypi' ], }, { 'target_name': 'chrome_android_core', diff --git a/content/content_shell.gypi b/content/content_shell.gypi index 4c45e15..b41587d 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -642,24 +642,7 @@ 'dependencies': [ 'content_shell_apk', ], - # This all_dependent_settings is used for java targets only. This will - # add the content_shell jar to the classpath of dependent java - # targets. - 'all_dependent_settings': { - 'variables': { - 'input_jars_paths': ['>(apk_output_jar_path)'], - }, - }, - # Add an action with the appropriate output. This allows the generated - # buildfiles to determine which target the output corresponds to. - 'actions': [ - { - 'action_name': 'fake_generate_jar', - 'inputs': [], - 'outputs': ['>(apk_output_jar_path)'], - 'action': [], - }, - ], + 'includes': [ '../build/apk_fake_jar.gypi' ], }, { 'target_name': 'content_shell_apk', |