# Copyright 2020 The Chromium Authors
# 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("//third_party/jni_zero/jni_zero.gni")
generate_jni("jni_headers") {
sources = [
"java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridge.java",
"java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridgeFactory.java",
]
}
android_library("java") {
sources = [
"java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridge.java",
"java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridgeFactory.java",
"java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuidePushNotificationManager.java",
]
deps = [
"//base:base_java",
"//build/android:build_java",
"//chrome/browser/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//components/optimization_guide/proto:optimization_guide_proto_java",
"//content/public/android:content_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/jni_zero:jni_zero_java",
"//url:gurl_java",
]
srcjar_deps = [
":jni_headers",
"//components/optimization_guide/core:optimization_guide_generated_enums",
]
}
generate_jni("native_j_unittests_jni_headers") {
testonly = true
sources = [
"java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridgeNativeUnitTest.java",
"java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuidePushNotificationTestHelper.java",
]
}
android_library("native_java_unittests") {
testonly = true
deps = [
":java",
"//base:base_java_test_support",
"//chrome/browser/flags:java",
"//chrome/browser/profiles/android:java",
"//components/optimization_guide/proto:optimization_guide_proto_java",
"//content/public/android:content_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/jni_zero:jni_zero_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//url:gurl_java",
]
sources = [
"java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridgeNativeUnitTest.java",
"java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuidePushNotificationTestHelper.java",
]
}
android_library("unit_device_javatests") {
testonly = true
sources = [
"java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridgeUnitTest.java",
"java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuidePushNotificationManagerUnitTest.java",
]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/browser/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/test/android:chrome_java_unit_test_support",
"//components/optimization_guide/proto:optimization_guide_proto_java",
"//content/public/android:content_full_java",
"//content/public/test/android:content_java_test_support",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/androidx:androidx_test_rules_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/jni_zero:jni_zero_java",
"//third_party/junit:junit",
"//third_party/mockito:mockito_java",
"//url:gurl_java",
]
}
android_library("javatests") {
testonly = true
sources = [ "javatests/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridgeFactoryUnitTest.java" ]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/android:chrome_test_util_java",
"//chrome/browser/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/test/android:chrome_java_integration_test_support",
"//components/optimization_guide/proto:optimization_guide_proto_java",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/androidx:androidx_test_core_java",
"//third_party/androidx:androidx_test_rules_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/jni_zero:jni_zero_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//url:gurl_java",
]
}