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

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

Issue 1435333008: GN: asset_location -> android_assets() for html_viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaswe Created 5 years, 1 month 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') | components/html_viewer/BUILD.gn » ('j') | 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("//build/toolchain/toolchain.gni") 8 import("//build/toolchain/toolchain.gni")
9 import("//third_party/android_platform/config.gni") 9 import("//third_party/android_platform/config.gni")
10 import("//tools/grit/grit_rule.gni") 10 import("//tools/grit/grit_rule.gni")
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 # native_libs: List paths of native libraries to include in this apk. If these 1194 # native_libs: List paths of native libraries to include in this apk. If these
1195 # libraries depend on other shared_library targets, those dependencies will 1195 # libraries depend on other shared_library targets, those dependencies will
1196 # also be included in the apk. 1196 # also be included in the apk.
1197 # native_lib_placeholders: List of placeholder filenames to add to the apk 1197 # native_lib_placeholders: List of placeholder filenames to add to the apk
1198 # (optional). 1198 # (optional).
1199 # apk_under_test: For an instrumentation test apk, this is the target of the 1199 # apk_under_test: For an instrumentation test apk, this is the target of the
1200 # tested apk. 1200 # tested apk.
1201 # include_all_resources - If true include all resource IDs in all generated 1201 # include_all_resources - If true include all resource IDs in all generated
1202 # R.java files. 1202 # R.java files.
1203 # testonly: Marks this target as "test-only". 1203 # testonly: Marks this target as "test-only".
1204 # write_asset_list: Adds an extra file to the assets, which contains a list of
1205 # all other asset files.
1204 # 1206 #
1205 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in 1207 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in
1206 # this directory will be included in the library. This is only supported to 1208 # this directory will be included in the library. This is only supported to
1207 # ease the gyp->gn conversion and will be removed in the future. 1209 # ease the gyp->gn conversion and will be removed in the future.
1208 # 1210 #
1209 # Example 1211 # Example
1210 # android_apk("foo_apk") { 1212 # android_apk("foo_apk") {
1211 # android_manifest = "AndroidManifest.xml" 1213 # android_manifest = "AndroidManifest.xml"
1212 # java_files = [ 1214 # java_files = [
1213 # "android/org/chromium/foo/FooApplication.java", 1215 # "android/org/chromium/foo/FooApplication.java",
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 _final_deps += [ ":${_template_name}__create" ] 1650 _final_deps += [ ":${_template_name}__create" ]
1649 create_apk("${_template_name}__create") { 1651 create_apk("${_template_name}__create") {
1650 deps = [] 1652 deps = []
1651 forward_variables_from(invoker, 1653 forward_variables_from(invoker,
1652 [ 1654 [
1653 "asset_location", 1655 "asset_location",
1654 "deps", 1656 "deps",
1655 "extensions_to_not_compress", 1657 "extensions_to_not_compress",
1656 "language_splits", 1658 "language_splits",
1657 "shared_resources", 1659 "shared_resources",
1660 "write_asset_list",
1658 ]) 1661 ])
1659 apk_path = _final_apk_path 1662 apk_path = _final_apk_path
1660 android_manifest = _android_manifest 1663 android_manifest = _android_manifest
1661 assets_build_config = _build_config 1664 assets_build_config = _build_config
1662 resources_zip = _all_resources_zip_path 1665 resources_zip = _all_resources_zip_path
1663 dex_path = final_dex_path 1666 dex_path = final_dex_path
1664 load_library_from_apk = _load_library_from_apk 1667 load_library_from_apk = _load_library_from_apk
1665 create_density_splits = _create_density_splits 1668 create_density_splits = _create_density_splits
1666 emma_instrument = emma_coverage && !_emma_never_instrument 1669 emma_instrument = emma_coverage && !_emma_never_instrument
1667 1670
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 # of the unittests_dep target postfixed with "_apk" 1908 # of the unittests_dep target postfixed with "_apk"
1906 # use_default_launcher: Whether the default activity (NativeUnitTestActivity) 1909 # use_default_launcher: Whether the default activity (NativeUnitTestActivity)
1907 # should be used for launching tests. 1910 # should be used for launching tests.
1908 # 1911 #
1909 # Example 1912 # Example
1910 # unittest_apk("foo_unittests_apk") { 1913 # unittest_apk("foo_unittests_apk") {
1911 # deps = [ ":foo_java", ":foo_resources" ] 1914 # deps = [ ":foo_java", ":foo_resources" ]
1912 # unittests_dep = ":foo_unittests" 1915 # unittests_dep = ":foo_unittests"
1913 # } 1916 # }
1914 template("unittest_apk") { 1917 template("unittest_apk") {
1915 set_sources_assignment_filter([]) 1918 android_apk(target_name) {
1916 testonly = true 1919 set_sources_assignment_filter([])
1920 data_deps = []
1921 deps = []
1922 forward_variables_from(invoker, "*")
1923 testonly = true
1917 1924
1918 assert(defined(invoker.unittests_dep), "Need unittests_dep for $target_name") 1925 assert(defined(unittests_dep), "Need unittests_dep for $target_name")
1919 1926
1920 test_suite_name = get_label_info(invoker.unittests_dep, "name") 1927 test_suite_name = get_label_info(unittests_dep, "name")
1921 1928
1922 # This trivial assert is needed in case both unittests_binary and apk_name 1929 # This trivial assert is needed in case both unittests_binary and apk_name
1923 # are defined, as otherwise test_suite_name would not be used. 1930 # are defined, as otherwise test_suite_name would not be used.
1924 assert(test_suite_name != "") 1931 assert(test_suite_name != "")
1925 1932
1926 if (defined(invoker.unittests_binary)) { 1933 if (!defined(apk_name)) {
1927 unittests_binary = invoker.unittests_binary 1934 apk_name = test_suite_name
1928 } else { 1935 }
1929 unittests_binary = "lib${test_suite_name}${shlib_extension}"
1930 }
1931 1936
1932 if (defined(invoker.apk_name)) { 1937 if (!defined(android_manifest)) {
1933 apk_name = invoker.apk_name 1938 android_manifest =
1934 } else { 1939 "//testing/android/native_test/java/AndroidManifest.xml"
1935 apk_name = test_suite_name 1940 }
1936 }
1937 1941
1938 android_apk(target_name) { 1942 if (!defined(unittests_binary)) {
1939 forward_variables_from(invoker, 1943 unittests_binary = "lib${test_suite_name}${shlib_extension}"
1940 [ 1944 }
1941 "asset_location", 1945
1942 "android_manifest",
1943 ])
1944 final_apk_path = "$root_build_dir/${apk_name}_apk/${apk_name}-debug.apk" 1946 final_apk_path = "$root_build_dir/${apk_name}_apk/${apk_name}-debug.apk"
1945 1947
1946 if (!defined(invoker.use_default_launcher) || invoker.use_default_launcher) { 1948 if (!defined(use_default_launcher) || use_default_launcher) {
1947 java_files = [ 1949 java_files = [
1948 "//testing/android/native_test/java/src/org/chromium/native_test/NativeB rowserTestActivity.java", 1950 "//testing/android/native_test/java/src/org/chromium/native_test/NativeB rowserTestActivity.java",
1949 "//testing/android/native_test/java/src/org/chromium/native_test/NativeT estActivity.java", 1951 "//testing/android/native_test/java/src/org/chromium/native_test/NativeT estActivity.java",
1950 "//testing/android/native_test/java/src/org/chromium/native_test/NativeU nitTestActivity.java", 1952 "//testing/android/native_test/java/src/org/chromium/native_test/NativeU nitTestActivity.java",
1951 "//testing/android/native_test/java/src/org/chromium/native_test/NativeT estInstrumentationTestRunner.java", 1953 "//testing/android/native_test/java/src/org/chromium/native_test/NativeT estInstrumentationTestRunner.java",
1952 ] 1954 ]
1953 } 1955 }
1954 if (!defined(invoker.android_manifest)) {
1955 android_manifest =
1956 "//testing/android/native_test/java/AndroidManifest.xml"
1957 }
1958 native_libs = [ unittests_binary ] 1956 native_libs = [ unittests_binary ]
1959 deps = [ 1957 deps += [
1960 "//base:base_java", 1958 "//base:base_java",
1961 "//build/android/pylib/remote/device/dummy:remote_device_dummy_apk", 1959 "//build/android/pylib/remote/device/dummy:remote_device_dummy_apk",
1962 "//testing/android/appurify_support:appurify_support_java", 1960 "//testing/android/appurify_support:appurify_support_java",
1963 "//testing/android/reporter:reporter_java", 1961 "//testing/android/reporter:reporter_java",
1964 ] 1962 ]
1965 if (defined(invoker.deps)) { 1963 data_deps += [ "//tools/android/md5sum" ]
1966 deps += invoker.deps
1967 }
1968 data_deps = [
1969 "//tools/android/md5sum",
1970 ]
1971 if (host_os == "linux") { 1964 if (host_os == "linux") {
1972 data_deps += [ "//tools/android/forwarder2" ] 1965 data_deps += [ "//tools/android/forwarder2" ]
1973 } 1966 }
1974 if (defined(invoker.data_deps)) {
1975 data_deps += invoker.data_deps
1976 }
1977 } 1967 }
1978 } 1968 }
1979 1969
1980 # Generate .java files from .aidl files. 1970 # Generate .java files from .aidl files.
1981 # 1971 #
1982 # This target will store the .java files in a srcjar and should be included in 1972 # This target will store the .java files in a srcjar and should be included in
1983 # an android_library or android_apk's srcjar_deps. 1973 # an android_library or android_apk's srcjar_deps.
1984 # 1974 #
1985 # Variables 1975 # Variables
1986 # sources: Paths to .aidl files to compile. 1976 # sources: Paths to .aidl files to compile.
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 } 2190 }
2201 2191
2202 android_library(target_name) { 2192 android_library(target_name) {
2203 java_files = [] 2193 java_files = []
2204 srcjar_deps = [ ":${_template_name}__protoc_java" ] 2194 srcjar_deps = [ ":${_template_name}__protoc_java" ]
2205 deps = [ 2195 deps = [
2206 "//third_party/android_protobuf:protobuf_nano_javalib", 2196 "//third_party/android_protobuf:protobuf_nano_javalib",
2207 ] 2197 ]
2208 } 2198 }
2209 } 2199 }
OLDNEW
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | components/html_viewer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698