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

Side by Side Diff: build/config/android/rules.gni

Issue 772493003: GN + Android: support standalone .dex.jar output of Android libraries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix building java (non-android) libraries. 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 unified diff | Download patch
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//base/android/linker/config.gni") 5 import("//base/android/linker/config.gni")
6 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
7 import("//build/config/android/internal_rules.gni") 7 import("//build/config/android/internal_rules.gni")
8 import("//tools/grit/grit_rule.gni") 8 import("//tools/grit/grit_rule.gni")
9 import("//tools/relocation_packer/config.gni") 9 import("//tools/relocation_packer/config.gni")
10 10
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 # ease the gyp->gn conversion and will be removed in the future. 913 # ease the gyp->gn conversion and will be removed in the future.
914 # 914 #
915 # chromium_code: If true, extra analysis warning/errors will be enabled. 915 # chromium_code: If true, extra analysis warning/errors will be enabled.
916 # jar_excluded_patterns: List of patterns of .class files to exclude from the 916 # jar_excluded_patterns: List of patterns of .class files to exclude from the
917 # final jar. 917 # final jar.
918 # 918 #
919 # proguard_preprocess: If true, proguard preprocessing will be run. This can 919 # proguard_preprocess: If true, proguard preprocessing will be run. This can
920 # be used to remove unwanted parts of the library. 920 # be used to remove unwanted parts of the library.
921 # proguard_config: Path to the proguard config for preprocessing. 921 # proguard_config: Path to the proguard config for preprocessing.
922 # 922 #
923 # dex_path: If set, the resulting .dex.jar file will be placed under this
924 # path.
925 # standalone_dex_path: If set, a standalone .dex.jar containing the code from
926 # the library and all dependencies will be placed under this path.
927 #
923 # 928 #
924 # Example 929 # Example
925 # android_library("foo_java") { 930 # android_library("foo_java") {
926 # java_files = [ 931 # java_files = [
927 # "android/org/chromium/foo/Foo.java", 932 # "android/org/chromium/foo/Foo.java",
928 # "android/org/chromium/foo/FooInterface.java", 933 # "android/org/chromium/foo/FooInterface.java",
929 # "android/org/chromium/foo/FooService.java", 934 # "android/org/chromium/foo/FooService.java",
930 # ] 935 # ]
931 # deps = [ 936 # deps = [
932 # ":bar_java" 937 # ":bar_java"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 } 979 }
975 if (defined(invoker.testonly)) { 980 if (defined(invoker.testonly)) {
976 testonly = invoker.testonly 981 testonly = invoker.testonly
977 } 982 }
978 if (defined(invoker.visibility)) { 983 if (defined(invoker.visibility)) {
979 visibility = invoker.visibility 984 visibility = invoker.visibility
980 } 985 }
981 if (defined(invoker.dex_path)) { 986 if (defined(invoker.dex_path)) {
982 dex_path = invoker.dex_path 987 dex_path = invoker.dex_path
983 } 988 }
989 if (defined(invoker.standalone_dex_path)) {
990 standalone_dex_path = invoker.standalone_dex_path
991 }
984 992
985 supports_android = true 993 supports_android = true
986 requires_android = true 994 requires_android = true
987 995
988 if (!defined(jar_excluded_patterns)) { 996 if (!defined(jar_excluded_patterns)) {
989 jar_excluded_patterns = [] 997 jar_excluded_patterns = []
990 } 998 }
991 jar_excluded_patterns += [ 999 jar_excluded_patterns += [
992 "*/R.class", 1000 "*/R.class",
993 "*/R##*.class", 1001 "*/R##*.class",
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 deps = [ 1296 deps = [
1289 ":${_template_name}__java", 1297 ":${_template_name}__java",
1290 ] 1298 ]
1291 sources = [ 1299 sources = [
1292 jar_path, 1300 jar_path,
1293 ] 1301 ]
1294 inputs = [ 1302 inputs = [
1295 _build_config, 1303 _build_config,
1296 ] 1304 ]
1297 output = final_dex_path 1305 output = final_dex_path
1298 dex_arg_key = "${_rebased_build_config}:apk_dex:dependency_dex_files" 1306 dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files"
1299 args = [ "--inputs=@FileArg($dex_arg_key)" ] 1307 args = [ "--inputs=@FileArg($dex_arg_key)" ]
1300 } 1308 }
1301 1309
1302 if (_native_libs != []) { 1310 if (_native_libs != []) {
1303 action("${_template_name}__prepare_native") { 1311 action("${_template_name}__prepare_native") {
1304 script = "//build/android/gyp/pack_arm_relocations.py" 1312 script = "//build/android/gyp/pack_arm_relocations.py"
1305 packed_libraries_dir = "$_native_libs_dir/$android_app_abi" 1313 packed_libraries_dir = "$_native_libs_dir/$android_app_abi"
1306 depfile = "$target_gen_dir/$target_name.d" 1314 depfile = "$target_gen_dir/$target_name.d"
1307 outputs = [ depfile ] 1315 outputs = [ depfile ]
1308 inputs = [ 1316 inputs = [
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 # TODO(GYP): implement this. 1675 # TODO(GYP): implement this.
1668 template("uiautomator_test") { 1676 template("uiautomator_test") {
1669 if (defined(invoker.testonly)) { 1677 if (defined(invoker.testonly)) {
1670 testonly = invoker.testonly 1678 testonly = invoker.testonly
1671 } 1679 }
1672 assert(target_name != "") 1680 assert(target_name != "")
1673 assert(invoker.deps != [] || true) 1681 assert(invoker.deps != [] || true)
1674 group(target_name) { 1682 group(target_name) {
1675 } 1683 }
1676 } 1684 }
OLDNEW
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698