diff options
Diffstat (limited to 'chromium/chrome/android/features/test_dummy/internal')
-rw-r--r-- | chromium/chrome/android/features/test_dummy/internal/BUILD.gn | 54 | ||||
-rw-r--r-- | chromium/chrome/android/features/test_dummy/internal/resources/resources.grd | 20 |
2 files changed, 72 insertions, 2 deletions
diff --git a/chromium/chrome/android/features/test_dummy/internal/BUILD.gn b/chromium/chrome/android/features/test_dummy/internal/BUILD.gn index 8b184fecf0f..b7dcdf918ae 100644 --- a/chromium/chrome/android/features/test_dummy/internal/BUILD.gn +++ b/chromium/chrome/android/features/test_dummy/internal/BUILD.gn @@ -2,27 +2,77 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/buildflag_header.gni") import("//build/config/android/rules.gni") +import("//chrome/android/modules/buildflags.gni") +import("//tools/grit/grit_rule.gni") + +android_resources("java_resources") { + resource_dirs = [ "java/res" ] + custom_package = "org.chromium.chrome.features.test_dummy" +} android_library("java") { deps = [ + ":base_module_java", + ":java_resources", "//base:base_java", "//chrome/android/features/test_dummy/public:java", "//third_party/android_deps:android_support_v7_appcompat_java", - "//third_party/android_deps:com_android_support_support_annotations_java", + "//third_party/android_deps:androidx_annotation_annotation_java", ] java_files = [ "java/src/org/chromium/chrome/features/test_dummy/TestDummyImpl.java" ] + + annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ] + deps += [ "//base:jni_java" ] +} + +source_set("native") { + sources = [ + "test_dummy_impl.cc", + ] + + deps = [ + ":jni_headers", + ":resources_native", + "//base", + "//ui/base", + ] } -# Code that should go into the base module. +# Java code that should go into the base module. If this were a normal feature, +# this target would reside in the client code using the module. Since this is a +# test dummy module, it has no pre-existing client, and hence the target is +# squatting here for convenience. The same is true for the corresponding native +# target. android_library("base_module_java") { deps = [ "//base:base_java", + "//chrome/android/features/test_dummy/public:java", "//chrome/android/modules/test_dummy/provider:java", + "//chrome/android/modules/test_dummy/public:java", "//third_party/android_deps:android_support_v7_appcompat_java", ] java_files = [ "java/src/org/chromium/chrome/features/test_dummy/TestDummyActivity.java", ] } + +generate_jni("jni_headers") { + sources = [ + "java/src/org/chromium/chrome/features/test_dummy/TestDummyImpl.java", + ] +} + +# Cannot call this just "resources" since all targets with that name in +# //chrome/android need a build_config, which grit targets don't have. +grit("resources_native") { + source = "resources/resources.grd" + outputs = [ + "grit/test_dummy_resources.h", + "test_dummy_resources.pak", + ] + output_dir = "$root_gen_dir/chrome" + depfile_dir = target_gen_dir +} diff --git a/chromium/chrome/android/features/test_dummy/internal/resources/resources.grd b/chromium/chrome/android/features/test_dummy/internal/resources/resources.grd new file mode 100644 index 00000000000..2f90200e989 --- /dev/null +++ b/chromium/chrome/android/features/test_dummy/internal/resources/resources.grd @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<grit latest_public_release="0" + current_release="1" + output_all_resource_defines="false"> + <outputs> + <output filename="grit/test_dummy_resources.h" + type="rc_header"> + <emit emit_type='prepend'></emit> + </output> + <output filename="test_dummy_resources.pak" + type="data_package" /> + </outputs> + <release seq="1"> + <includes> + <include name="IDR_TEST_DUMMY_TEST_RESOURCE" + file="test_resource.txt" + type="BINDATA" /> + </includes> + </release> +</grit> |