OLD | NEW |
---|---|
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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 | 923 # dex_path: If set, the resulting .dex.jar file will be placed under this |
924 # path. | 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 # | 925 # |
928 # | 926 # |
929 # Example | 927 # Example |
930 # android_library("foo_java") { | 928 # android_library("foo_java") { |
931 # java_files = [ | 929 # java_files = [ |
932 # "android/org/chromium/foo/Foo.java", | 930 # "android/org/chromium/foo/Foo.java", |
933 # "android/org/chromium/foo/FooInterface.java", | 931 # "android/org/chromium/foo/FooInterface.java", |
934 # "android/org/chromium/foo/FooService.java", | 932 # "android/org/chromium/foo/FooService.java", |
935 # ] | 933 # ] |
936 # deps = [ | 934 # deps = [ |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
979 } | 977 } |
980 if (defined(invoker.testonly)) { | 978 if (defined(invoker.testonly)) { |
981 testonly = invoker.testonly | 979 testonly = invoker.testonly |
982 } | 980 } |
983 if (defined(invoker.visibility)) { | 981 if (defined(invoker.visibility)) { |
984 visibility = invoker.visibility | 982 visibility = invoker.visibility |
985 } | 983 } |
986 if (defined(invoker.dex_path)) { | 984 if (defined(invoker.dex_path)) { |
987 dex_path = invoker.dex_path | 985 dex_path = invoker.dex_path |
988 } | 986 } |
989 if (defined(invoker.standalone_dex_path)) { | |
990 standalone_dex_path = invoker.standalone_dex_path | |
991 } | |
992 | 987 |
993 supports_android = true | 988 supports_android = true |
994 requires_android = true | 989 requires_android = true |
995 | 990 |
996 if (!defined(jar_excluded_patterns)) { | 991 if (!defined(jar_excluded_patterns)) { |
997 jar_excluded_patterns = [] | 992 jar_excluded_patterns = [] |
998 } | 993 } |
999 jar_excluded_patterns += [ | 994 jar_excluded_patterns += [ |
1000 "*/R.class", | 995 "*/R.class", |
1001 "*/R##*.class", | 996 "*/R##*.class", |
1002 "*/Manifest.class", | 997 "*/Manifest.class", |
1003 "*/Manifest##*.class", | 998 "*/Manifest##*.class", |
1004 ] | 999 ] |
1005 } | 1000 } |
1006 } | 1001 } |
1007 | 1002 |
1003 # Declare a target that packages a set of Java dependencies into a standalone | |
1004 # .dex.jar. | |
1005 # | |
1006 # Variables | |
1007 # deps: specifies the dependencies of this target. Android libraries and | |
1008 # resources in deps will be packaged into the resulting .dex.jar file. | |
1009 # standalone_dex_path: optional override for the output file location. | |
1010 template("android_standalone_library") { | |
1011 deps_dex(target_name) { | |
1012 deps = invoker.deps | |
1013 if (defined(invoker.standalone_dex_path)) { | |
1014 standalone_dex_path = invoker.standalone_dex_path | |
cjhopman
2014/12/08 21:27:51
I think you should require the invoker to specify
ppi
2014/12/09 15:17:29
Done.
| |
1015 } else { | |
1016 standalone_dex_path = "$target_out_dir/$target_name.dex.jar" | |
1017 } | |
1018 } | |
1019 } | |
1020 | |
1008 # Declare an Android library target for a prebuilt jar | 1021 # Declare an Android library target for a prebuilt jar |
1009 # | 1022 # |
1010 # This target creates an Android library containing java code and Android | 1023 # This target creates an Android library containing java code and Android |
1011 # resources. | 1024 # resources. |
1012 # | 1025 # |
1013 # Variables | 1026 # Variables |
1014 # deps: Specifies the dependencies of this target. Java targets in this list | 1027 # deps: Specifies the dependencies of this target. Java targets in this list |
1015 # will be added to the javac classpath. Android resources in dependencies | 1028 # will be added to the javac classpath. Android resources in dependencies |
1016 # will be used when building this library. | 1029 # will be used when building this library. |
1017 # jar_path: Path to the prebuilt jar. | 1030 # jar_path: Path to the prebuilt jar. |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1676 # TODO(GYP): implement this. | 1689 # TODO(GYP): implement this. |
1677 template("uiautomator_test") { | 1690 template("uiautomator_test") { |
1678 if (defined(invoker.testonly)) { | 1691 if (defined(invoker.testonly)) { |
1679 testonly = invoker.testonly | 1692 testonly = invoker.testonly |
1680 } | 1693 } |
1681 assert(target_name != "") | 1694 assert(target_name != "") |
1682 assert(invoker.deps != [] || true) | 1695 assert(invoker.deps != [] || true) |
1683 group(target_name) { | 1696 group(target_name) { |
1684 } | 1697 } |
1685 } | 1698 } |
OLD | NEW |