# Copyright 2018 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("module_installer_java") { sources = [ "java/src/org/chromium/components/module_installer/builder/Module.java", "java/src/org/chromium/components/module_installer/builder/ModuleDescriptor.java", "java/src/org/chromium/components/module_installer/builder/ModuleEngine.java", "java/src/org/chromium/components/module_installer/engine/ApkEngine.java", "java/src/org/chromium/components/module_installer/engine/EngineFactory.java", "java/src/org/chromium/components/module_installer/engine/FakeEngine.java", "java/src/org/chromium/components/module_installer/engine/InstallEngine.java", "java/src/org/chromium/components/module_installer/engine/InstallListener.java", "java/src/org/chromium/components/module_installer/engine/SplitCompatEngine.java", "java/src/org/chromium/components/module_installer/engine/SplitCompatEngineFacade.java", "java/src/org/chromium/components/module_installer/logger/Logger.java", "java/src/org/chromium/components/module_installer/logger/PlayCoreLogger.java", "java/src/org/chromium/components/module_installer/logger/SplitAvailabilityLogger.java", "java/src/org/chromium/components/module_installer/logger/SplitInstallFailureLogger.java", "java/src/org/chromium/components/module_installer/logger/SplitInstallStatusLogger.java", "java/src/org/chromium/components/module_installer/observer/ActivityObserver.java", "java/src/org/chromium/components/module_installer/observer/ActivityObserverFacade.java", "java/src/org/chromium/components/module_installer/observer/InstallerObserver.java", "java/src/org/chromium/components/module_installer/util/ActivityObserverUtil.java", "java/src/org/chromium/components/module_installer/util/CrashKeyRecorder.java", "java/src/org/chromium/components/module_installer/util/ModuleUtil.java", "java/src/org/chromium/components/module_installer/util/SplitCompatInitializer.java", "java/src/org/chromium/components/module_installer/util/Timer.java", ] deps = [ "//base:base_java", "//base:jni_java", "//components/crash/android:java", "//third_party/android_deps:androidx_annotation_annotation_java", "//third_party/google_android_play_core:com_google_android_play_core_java", ] annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ] } junit_binary("module_installer_junit_tests") { sources = [ "junit/src/org/chromium/components/module_installer/builder/ModuleEngineTest.java", "junit/src/org/chromium/components/module_installer/builder/ModuleTest.java", "junit/src/org/chromium/components/module_installer/engine/ApkEngineTest.java", "junit/src/org/chromium/components/module_installer/engine/SplitCompatEngineTest.java", "junit/src/org/chromium/components/module_installer/logger/LoggerTestUtil.java", "junit/src/org/chromium/components/module_installer/logger/PlayCoreLoggerTest.java", "junit/src/org/chromium/components/module_installer/logger/SplitInstallFailureLoggerTest.java", "junit/src/org/chromium/components/module_installer/logger/SplitInstallStatusLoggerTest.java", "junit/src/org/chromium/components/module_installer/observer/ActivityObserverTest.java", ] deps = [ ":module_installer_java", "//base:base_java", "//base:base_java_test_support", "//base:base_junit_test_support", "//third_party/google_android_play_core:com_google_android_play_core_java", "//third_party/hamcrest:hamcrest_java", ] } java_library("module_interface_java") { supports_android = true sources = [ "java/src/org/chromium/components/module_installer/builder/ModuleInterface.java" ] } java_annotation_processor("module_interface_processor") { sources = [ "java/src/org/chromium/components/module_installer/builder/ModuleInterfaceProcessor.java" ] main_class = "org.chromium.components.module_installer.builder.ModuleInterfaceProcessor" annotation_processor_deps = [ "//third_party/android_deps:auto_service_processor" ] deps = [ ":module_interface_java", "//third_party/android_deps:com_google_auto_service_auto_service_annotations_java", "//third_party/android_deps:com_google_guava_guava_java", "//third_party/android_deps:com_squareup_javapoet_java", "//third_party/android_deps:javax_annotation_jsr250_api_java", ] } source_set("native") { sources = [ "module.cc" ] deps = [ ":jni_headers", "//base", "//ui/base", ] # The method used to load and register JNI for native libraries depends # on build type. if (use_native_partitions) { defines = [ "LOAD_FROM_PARTITIONS" ] } } generate_jni("jni_headers") { sources = [ "java/src/org/chromium/components/module_installer/builder/Module.java", ] }