Android: Add java files from android_apk targets

This allows editing android_webview_apk and android_webview_test_apk
files in android studio.

BUG=670044

Review-Url: https://codereview.chromium.org/2545793002
Cr-Original-Commit-Position: refs/heads/master@{#437056}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c3bace8213461c2a3884b36a3b80aea0e651b15a
This commit is contained in:
wnwen 2016-12-07 13:11:58 -08:00 коммит произвёл Commit bot
Родитель ff322f157b
Коммит e430bfd810
2 изменённых файлов: 20 добавлений и 1 удалений

Просмотреть файл

@ -2245,6 +2245,11 @@ if (enable_java_templates) {
_accumulated_deps = invoker.deps
}
# Caller overriding build config must have valid java sources file if it has
# java files.
assert(!defined(invoker.override_build_config) ||
!defined(invoker.java_files) || defined(invoker.java_sources_file))
assert(defined(invoker.java_files) || defined(invoker.srcjars) ||
defined(invoker.srcjar_deps))
_base_path = "$target_gen_dir/$target_name"
@ -2326,7 +2331,11 @@ if (enable_java_templates) {
_java_files += invoker.java_files
}
if (_java_files != []) {
_java_sources_file = "$_base_path.sources"
if (defined(invoker.java_sources_file)) {
_java_sources_file = invoker.java_sources_file
} else {
_java_sources_file = "$_base_path.sources"
}
write_file(_java_sources_file, rebase_path(_java_files, root_build_dir))
}

Просмотреть файл

@ -1433,6 +1433,9 @@ if (enable_java_templates) {
_lib_dex_path = "$base_path.dex.jar"
_rebased_lib_dex_path = rebase_path(_lib_dex_path, root_build_dir)
_template_name = target_name
if (defined(invoker.java_files)) {
_java_sources_file = "$base_path.sources"
}
enable_multidex =
defined(invoker.enable_multidex) && invoker.enable_multidex
@ -1616,6 +1619,10 @@ if (enable_java_templates) {
build_config = _build_config
android_manifest = _android_manifest
if (defined(_java_sources_file)) {
java_sources_file = _java_sources_file
}
deps = _android_manifest_deps
if (defined(invoker.deps)) {
@ -1782,6 +1789,9 @@ if (enable_java_templates) {
jar_path = _jar_path
dex_path = _lib_dex_path
emma_never_instrument = _emma_never_instrument
if (defined(_java_sources_file)) {
java_sources_file = _java_sources_file
}
if (defined(invoker.deps)) {
deps += invoker.deps