1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//mojo/public/mojo_application.gni")
6 import("//testing/test.gni")
9 import("//build/config/android/rules.gni")
11 java_library_path = "$target_out_dir/java_library.dex.jar"
13 mojo_android_application("resource_provider") {
14 input_so = "$root_out_dir/lib.stripped/libresource_provider_lib$android_product_extension"
15 input_dex_jar = java_library_path
18 ":resource_provider_lib",
19 "//third_party/icu:icudata",
22 resources = [ "$root_out_dir/icudtl.dat" ]
25 shared_library("resource_provider_lib") {
27 "android/android_hooks.cc",
35 "//components/resource_provider/public/interfaces",
36 "//mojo/environment:chromium",
37 "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
42 generate_jni("jni_headers") {
44 "android/java/org/chromium/resource_provider/Main.java",
46 jni_package = "components/resource_provider"
49 android_library("java_classes") {
50 java_files = [ "android/java/org/chromium/resource_provider/Main.java" ]
57 android_standalone_library("java_library") {
58 dex_path = java_library_path
65 mojo_native_application("resource_provider") {
73 "//components/resource_provider/public/interfaces",
74 "//mojo/environment:chromium",
75 "//third_party/icu:icudata",
79 resources = [ "$root_out_dir/icudtl.dat" ]
87 "resource_provider_app.cc",
88 "resource_provider_app.h",
89 "resource_provider_impl.cc",
90 "resource_provider_impl.h",
95 "//components/resource_provider/public/interfaces",
96 "//mojo/application/public/cpp",
97 "//mojo/common:common_base",
98 "//mojo/platform_handle",
103 test("resource_provider_unittests") {
105 "file_utils_unittest.cc",
111 "//base/test:test_config",
112 "//components/resource_provider/public/interfaces",
113 "//mojo/environment:chromium",
115 "//third_party/mojo/src/mojo/edk/test:run_all_unittests",
120 mojo_native_application("apptests") {
121 output_name = "resource_provider_apptests"
125 "resource_provider_apptest.cc",
129 "//components/test/data/resource_provider/sample",
130 "//components/test/data/resource_provider/dir",
135 "//base/test:test_config",
136 "//components/resource_provider/public/cpp",
137 "//components/resource_provider/public/interfaces",
138 "//mojo/application/public/cpp:test_support",
139 "//mojo/platform_handle",
142 data_deps = [ ":resource_provider" ]