Commit 4351f9c1 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Delete android_standalone_library() template

It's unused and the functionality is duplicated in dist_jar().

Change-Id: I9d689e4bb310412a1e1a883bc0fb9f46f7cd1ede
Reviewed-on: https://chromium-review.googlesource.com/833157Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525340}
parent c58f0f1a
...@@ -35,7 +35,7 @@ import xml.dom.minidom ...@@ -35,7 +35,7 @@ import xml.dom.minidom
from util import build_utils from util import build_utils
# Types that should never be used as a dependency of another build config. # Types that should never be used as a dependency of another build config.
_ROOT_TYPES = ('android_apk', 'deps_dex', 'java_binary', _ROOT_TYPES = ('android_apk', 'java_binary',
'java_annotation_processor', 'junit_binary', 'resource_rewriter') 'java_annotation_processor', 'junit_binary', 'resource_rewriter')
# Types that should not allow code deps to pass through. # Types that should not allow code deps to pass through.
_RESOURCE_TYPES = ('android_assets', 'android_resources') _RESOURCE_TYPES = ('android_assets', 'android_resources')
...@@ -366,7 +366,6 @@ def main(argv): ...@@ -366,7 +366,6 @@ def main(argv):
'android_assets': ['build_config'], 'android_assets': ['build_config'],
'android_resources': ['build_config', 'resources_zip'], 'android_resources': ['build_config', 'resources_zip'],
'android_apk': ['build_config','dex_path'] + jar_path_options, 'android_apk': ['build_config','dex_path'] + jar_path_options,
'deps_dex': ['build_config', 'dex_path'],
'dist_jar': ['build_config'], 'dist_jar': ['build_config'],
'resource_rewriter': ['build_config'], 'resource_rewriter': ['build_config'],
'group': ['build_config'], 'group': ['build_config'],
...@@ -602,7 +601,7 @@ def main(argv): ...@@ -602,7 +601,7 @@ def main(argv):
config['resources']['extra_package_names'] = extra_package_names config['resources']['extra_package_names'] = extra_package_names
config['resources']['extra_r_text_files'] = extra_r_text_files config['resources']['extra_r_text_files'] = extra_r_text_files
if options.type in ['android_apk', 'deps_dex']: if options.type == 'android_apk':
deps_dex_files = [c['dex_path'] for c in all_library_deps] deps_dex_files = [c['dex_path'] for c in all_library_deps]
if is_java_target: if is_java_target:
...@@ -706,8 +705,8 @@ def main(argv): ...@@ -706,8 +705,8 @@ def main(argv):
proguard_config['lib_paths'] = extra_jars proguard_config['lib_paths'] = extra_jars
proguard_config['lib_configs'] = lib_configs proguard_config['lib_configs'] = lib_configs
# Dependencies for the final dex file of an apk or a 'deps_dex'. # Dependencies for the final dex file of an apk.
if options.type in ['android_apk', 'deps_dex']: if options.type == 'android_apk':
config['final_dex'] = {} config['final_dex'] = {}
dex_config = config['final_dex'] dex_config = config['final_dex']
dex_config['dependency_dex_files'] = deps_dex_files dex_config['dependency_dex_files'] = deps_dex_files
......
...@@ -84,10 +84,9 @@ template("write_build_config") { ...@@ -84,10 +84,9 @@ template("write_build_config") {
build_config = invoker.build_config build_config = invoker.build_config
assert(type == "android_apk" || type == "java_library" || assert(type == "android_apk" || type == "java_library" ||
type == "android_resources" || type == "deps_dex" || type == "android_resources" || type == "dist_jar" ||
type == "dist_jar" || type == "android_assets" || type == "android_assets" || type == "resource_rewriter" ||
type == "resource_rewriter" || type == "java_binary" || type == "java_binary" || type == "group" || type == "junit_binary" ||
type == "group" || type == "junit_binary" ||
type == "java_annotation_processor") type == "java_annotation_processor")
forward_variables_from(invoker, forward_variables_from(invoker,
...@@ -150,7 +149,6 @@ template("write_build_config") { ...@@ -150,7 +149,6 @@ template("write_build_config") {
is_apk = type == "android_apk" is_apk = type == "android_apk"
is_android_assets = type == "android_assets" is_android_assets = type == "android_assets"
is_android_resources = type == "android_resources" is_android_resources = type == "android_resources"
is_deps_dex = type == "deps_dex"
is_group = type == "group" is_group = type == "group"
supports_android = is_android_assets || is_android_resources supports_android = is_android_assets || is_android_resources
...@@ -168,7 +166,6 @@ template("write_build_config") { ...@@ -168,7 +166,6 @@ template("write_build_config") {
# Mark these variables as used. # Mark these variables as used.
assert(is_apk || true) assert(is_apk || true)
assert(is_android_resources || true) assert(is_android_resources || true)
assert(is_deps_dex || true)
assert(is_group || true) assert(is_group || true)
if (defined(invoker.jar_path)) { if (defined(invoker.jar_path)) {
...@@ -2648,39 +2645,6 @@ if (enable_java_templates) { ...@@ -2648,39 +2645,6 @@ if (enable_java_templates) {
} }
} }
# Produces a single .dex.jar out of a set of Java dependencies.
template("deps_dex") {
set_sources_assignment_filter([])
build_config = "$target_gen_dir/${target_name}.build_config"
build_config_target_name = "${target_name}__build_config"
write_build_config(build_config_target_name) {
forward_variables_from(invoker, [ "dex_path" ])
if (defined(invoker.deps)) {
possible_config_deps = invoker.deps
}
type = "deps_dex"
build_config = build_config
}
rebased_build_config = rebase_path(build_config, root_build_dir)
dex(target_name) {
inputs = [
build_config,
]
output = invoker.dex_path
dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files"
args = [ "--inputs=@FileArg($dex_arg_key)" ]
if (defined(invoker.excluded_jars)) {
excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir)
args += [ "--excluded-paths=${excluded_jars}" ]
}
deps = [
":$build_config_target_name",
]
}
}
# Creates an AndroidManifest.xml for an APK split. # Creates an AndroidManifest.xml for an APK split.
template("generate_split_manifest") { template("generate_split_manifest") {
assert(defined(invoker.main_manifest)) assert(defined(invoker.main_manifest))
......
...@@ -1526,26 +1526,6 @@ if (enable_java_templates) { ...@@ -1526,26 +1526,6 @@ if (enable_java_templates) {
} }
} }
# Declare a target that packages a set of Java dependencies into a standalone
# .dex.jar.
#
# Variables
# deps: specifies the dependencies of this target. Android libraries in deps
# will be packaged into the resulting .dex.jar file.
# dex_path: location at which the output file will be put
template("android_standalone_library") {
deps_dex(target_name) {
forward_variables_from(invoker,
[
"deps",
"dex_path",
"excluded_jars",
])
}
supports_android = true
requires_android = true
}
# Declare an Android library target for a prebuilt jar # Declare an Android library target for a prebuilt jar
# #
# This target creates an Android library containing java code and Android # This target creates an Android library containing java code and Android
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment