Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4095)

Unified Diff: build/config/android/rules.gni

Issue 778093004: GN + Android: extract android_standalone_library rule. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/config/android/rules.gni
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index 5d0cb372388f729608e30c4c27e8dec2b8415e0d..09ec580e635c1bccca039b153bf48774448ed660 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -922,8 +922,6 @@ template("java_prebuilt") {
#
# dex_path: If set, the resulting .dex.jar file will be placed under this
# path.
-# standalone_dex_path: If set, a standalone .dex.jar containing the code from
-# the library and all dependencies will be placed under this path.
#
#
# Example
@@ -986,9 +984,6 @@ template("android_library") {
if (defined(invoker.dex_path)) {
dex_path = invoker.dex_path
}
- if (defined(invoker.standalone_dex_path)) {
- standalone_dex_path = invoker.standalone_dex_path
- }
supports_android = true
requires_android = true
@@ -1005,6 +1000,27 @@ template("android_library") {
}
}
+# Declare an Android library that packages its dependencies into a single
+# .dex.jar.
+#
+# Variables
+# deps: specifies the dependencies of this target. Android libraries and
+# resources in deps will be packaged into the resulting .dex.jar file.
+# standalone_dex_path: optional override for the output file location.
+template("android_standalone_library") {
+ java_library_impl(target_name) {
+ deps = invoker.deps
+ if (defined(invoker.standalone_dex_path)) {
+ standalone_dex_path = invoker.standalone_dex_path
+ } else {
+ standalone_dex_path = "$target_out_dir/$target_name.dex.jar"
+ }
+
+ supports_android = true
+ requires_android = true
+ }
+}
+
# Declare an Android library target for a prebuilt jar
#
# This target creates an Android library containing java code and Android
« build/config/android/internal_rules.gni ('K') | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698