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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 # ease the gyp->gn conversion and will be removed in the future. | 808 # ease the gyp->gn conversion and will be removed in the future. |
809 # | 809 # |
810 # chromium_code: If true, extra analysis warning/errors will be enabled. | 810 # chromium_code: If true, extra analysis warning/errors will be enabled. |
811 # jar_excluded_patterns: List of patterns of .class files to exclude from the | 811 # jar_excluded_patterns: List of patterns of .class files to exclude from the |
812 # final jar. | 812 # final jar. |
813 # | 813 # |
814 # proguard_preprocess: If true, proguard preprocessing will be run. This can | 814 # proguard_preprocess: If true, proguard preprocessing will be run. This can |
815 # be used to remove unwanted parts of the library. | 815 # be used to remove unwanted parts of the library. |
816 # proguard_config: Path to the proguard config for preprocessing. | 816 # proguard_config: Path to the proguard config for preprocessing. |
817 # | 817 # |
| 818 # dex_path: If set, the resulting .dex.jar file will be placed under this |
| 819 # path. |
| 820 # standalone_dex_path: If set, a standalone .dex.jar containing the code from |
| 821 # the library and all dependencies will be placed under this path. |
| 822 # |
818 # | 823 # |
819 # Example | 824 # Example |
820 # android_library("foo_java") { | 825 # android_library("foo_java") { |
821 # java_files = [ | 826 # java_files = [ |
822 # "android/org/chromium/foo/Foo.java", | 827 # "android/org/chromium/foo/Foo.java", |
823 # "android/org/chromium/foo/FooInterface.java", | 828 # "android/org/chromium/foo/FooInterface.java", |
824 # "android/org/chromium/foo/FooService.java", | 829 # "android/org/chromium/foo/FooService.java", |
825 # ] | 830 # ] |
826 # deps = [ | 831 # deps = [ |
827 # ":bar_java" | 832 # ":bar_java" |
(...skipping 15 matching lines...) Expand all Loading... |
843 if (defined(invoker.deps)) { deps = invoker.deps } | 848 if (defined(invoker.deps)) { deps = invoker.deps } |
844 if (defined(invoker.jar_excluded_patterns)) { jar_excluded_patterns = invoke
r.jar_excluded_patterns } | 849 if (defined(invoker.jar_excluded_patterns)) { jar_excluded_patterns = invoke
r.jar_excluded_patterns } |
845 if (defined(invoker.java_files)) { java_files = invoker.java_files } | 850 if (defined(invoker.java_files)) { java_files = invoker.java_files } |
846 if (defined(invoker.proguard_config)) { proguard_config = invoker.proguard_c
onfig } | 851 if (defined(invoker.proguard_config)) { proguard_config = invoker.proguard_c
onfig } |
847 if (defined(invoker.proguard_preprocess)) { proguard_preprocess = invoker.pr
oguard_preprocess } | 852 if (defined(invoker.proguard_preprocess)) { proguard_preprocess = invoker.pr
oguard_preprocess } |
848 if (defined(invoker.srcjar_deps)) { srcjar_deps = invoker.srcjar_deps } | 853 if (defined(invoker.srcjar_deps)) { srcjar_deps = invoker.srcjar_deps } |
849 if (defined(invoker.srcjars)) { srcjars = invoker.srcjars } | 854 if (defined(invoker.srcjars)) { srcjars = invoker.srcjars } |
850 if (defined(invoker.testonly)) { testonly = invoker.testonly } | 855 if (defined(invoker.testonly)) { testonly = invoker.testonly } |
851 if (defined(invoker.visibility)) { visibility = invoker.visibility } | 856 if (defined(invoker.visibility)) { visibility = invoker.visibility } |
852 if (defined(invoker.dex_path)) { dex_path = invoker.dex_path } | 857 if (defined(invoker.dex_path)) { dex_path = invoker.dex_path } |
| 858 if (defined(invoker.standalone_dex_path)) { standalone_dex_path = invoker.st
andalone_dex_path } |
853 | 859 |
854 supports_android = true | 860 supports_android = true |
855 requires_android = true | 861 requires_android = true |
856 | 862 |
857 if (!defined(jar_excluded_patterns)) { jar_excluded_patterns = [] } | 863 if (!defined(jar_excluded_patterns)) { jar_excluded_patterns = [] } |
858 jar_excluded_patterns += [ | 864 jar_excluded_patterns += [ |
859 "*/R.class", "*/R##*.class", | 865 "*/R.class", "*/R##*.class", |
860 "*/Manifest.class", "*/Manifest##*.class", | 866 "*/Manifest.class", "*/Manifest##*.class", |
861 ] | 867 ] |
862 } | 868 } |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 ] | 1142 ] |
1137 } | 1143 } |
1138 } | 1144 } |
1139 | 1145 |
1140 final_deps += [":${_template_name}__final_dex"] | 1146 final_deps += [":${_template_name}__final_dex"] |
1141 dex("${_template_name}__final_dex") { | 1147 dex("${_template_name}__final_dex") { |
1142 deps = [ ":${_template_name}__java" ] | 1148 deps = [ ":${_template_name}__java" ] |
1143 sources = [ jar_path ] | 1149 sources = [ jar_path ] |
1144 inputs = [ _build_config ] | 1150 inputs = [ _build_config ] |
1145 output = final_dex_path | 1151 output = final_dex_path |
1146 dex_arg_key = "${_rebased_build_config}:apk_dex:dependency_dex_files" | 1152 dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files" |
1147 args = [ "--inputs=@FileArg($dex_arg_key)" ] | 1153 args = [ "--inputs=@FileArg($dex_arg_key)" ] |
1148 } | 1154 } |
1149 | 1155 |
1150 if (_native_libs != []) { | 1156 if (_native_libs != []) { |
1151 action("${_template_name}__prepare_native") { | 1157 action("${_template_name}__prepare_native") { |
1152 script = "//build/android/gyp/pack_arm_relocations.py" | 1158 script = "//build/android/gyp/pack_arm_relocations.py" |
1153 packed_libraries_dir = "$_native_libs_dir/$android_app_abi" | 1159 packed_libraries_dir = "$_native_libs_dir/$android_app_abi" |
1154 depfile = "$target_gen_dir/$target_name.d" | 1160 depfile = "$target_gen_dir/$target_name.d" |
1155 outputs = [ | 1161 outputs = [ |
1156 depfile | 1162 depfile |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1501 } | 1507 } |
1502 | 1508 |
1503 # TODO(GYP): implement this. | 1509 # TODO(GYP): implement this. |
1504 template("uiautomator_test") { | 1510 template("uiautomator_test") { |
1505 if (defined(invoker.testonly)) { testonly = invoker.testonly } | 1511 if (defined(invoker.testonly)) { testonly = invoker.testonly } |
1506 assert(target_name != "") | 1512 assert(target_name != "") |
1507 assert(invoker.deps != [] || true) | 1513 assert(invoker.deps != [] || true) |
1508 group(target_name) { | 1514 group(target_name) { |
1509 } | 1515 } |
1510 } | 1516 } |
OLD | NEW |