blob: 4318f9d408b9ed405a9204def3b475cecb84b520 [file] [log] [blame]
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
import("//chrome/android/modules/buildflags.gni")
android_library("java") {
java_files = [ "java/src/org/chromium/chrome/modules/test_dummy/TestDummyProviderImpl.java" ]
deps = [
"//base:base_java",
"//chrome/android/features/test_dummy/internal:java",
"//chrome/android/features/test_dummy/public:java",
"//chrome/android/modules/test_dummy/public:java",
]
}
# This group is effectively alias representing the module's native code,
# allowing it to be named "native" for clarity in module descriptors. The
# component target must be named according to the feature, so that the component
# build's .cr.co library is named properly (ie. libtest_dummy.cr.so).
group("native") {
deps = [
":test_dummy",
]
}
component("test_dummy") {
sources = [
"entrypoints.cc",
]
deps = [
":jni_registration",
"//base",
"//chrome/android/features/test_dummy/internal:native",
]
# Test dummy native entrypoints belong in the partition.
if (use_native_modules) {
cflags = [ "-fsymbol-partition=libtest_dummy.so" ]
}
}
# TODO(https://crbug.com/1008109): Adapt JNI registration to point at a Java
# target, instead of an APK/module target. This JNI registration target
# points at ChromeModern's module, but it's used by Monochrome as well, since
# both variants do explicit JNI registration in DFMs (for consistency).
#
# Alternatively, move to lazy JNI init for DFMs in Monochrome, by conditionally
# including a registration stub, as Chrome's base library does. That requires
# two sets of registration targets, so that the feature module template can
# selectively pull in the real version or a stub.
generate_jni_registration("jni_registration") {
target =
"//chrome/android:chrome_modern_public_bundle__test_dummy_bundle_module"
header_output = "$target_gen_dir/jni_registration.h"
namespace = "test_dummy"
}
android_assets("pak_assets") {
sources = [
"$root_gen_dir/chrome/test_dummy_resources.pak",
]
deps = [
"//chrome/android/features/test_dummy/internal:resources_native",
]
disable_compression = true
}