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

Side by Side 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: Address Chris's comment. 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
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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 in deps
1008 # will be packaged into the resulting .dex.jar file.
1009 # dex_path: location at which the output file will be put
1010 template("android_standalone_library") {
1011 deps_dex(target_name) {
1012 deps = invoker.deps
1013 dex_path = invoker.dex_path
1014 }
1015 }
1016
1008 # Declare an Android library target for a prebuilt jar 1017 # Declare an Android library target for a prebuilt jar
1009 # 1018 #
1010 # This target creates an Android library containing java code and Android 1019 # This target creates an Android library containing java code and Android
1011 # resources. 1020 # resources.
1012 # 1021 #
1013 # Variables 1022 # Variables
1014 # deps: Specifies the dependencies of this target. Java targets in this list 1023 # deps: Specifies the dependencies of this target. Java targets in this list
1015 # will be added to the javac classpath. Android resources in dependencies 1024 # will be added to the javac classpath. Android resources in dependencies
1016 # will be used when building this library. 1025 # will be used when building this library.
1017 # jar_path: Path to the prebuilt jar. 1026 # jar_path: Path to the prebuilt jar.
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 # TODO(GYP): implement this. 1685 # TODO(GYP): implement this.
1677 template("uiautomator_test") { 1686 template("uiautomator_test") {
1678 if (defined(invoker.testonly)) { 1687 if (defined(invoker.testonly)) {
1679 testonly = invoker.testonly 1688 testonly = invoker.testonly
1680 } 1689 }
1681 assert(target_name != "") 1690 assert(target_name != "")
1682 assert(invoker.deps != [] || true) 1691 assert(invoker.deps != [] || true)
1683 group(target_name) { 1692 group(target_name) {
1684 } 1693 }
1685 } 1694 }
OLDNEW
« build/android/gyp/write_build_config.py ('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