| # Copyright 2018 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/config.gni") |
| import("//build/config/android/rules.gni") |
| import("//third_party/jni_zero/jni_zero.gni") |
| |
| generate_jni("jni_headers") { |
| sources = [ "java/src/org/chromium/components/language/AndroidLanguageMetricsBridge.java" ] |
| } |
| |
| source_set("language_bridge") { |
| sources = [ "android_language_metrics_bridge.cc" ] |
| deps = [ |
| ":jni_headers", |
| "//base", |
| "//components/language/content/browser", |
| ] |
| } |
| |
| android_library("java") { |
| srcjar_deps = [ ":jni_headers" ] |
| sources = [ |
| "java/src/org/chromium/components/language/AndroidLanguageMetricsBridge.java", |
| "java/src/org/chromium/components/language/LanguageProfileController.java", |
| "java/src/org/chromium/components/language/LanguageProfileDelegate.java", |
| "java/src/org/chromium/components/language/LanguageProfileMetricsLogger.java", |
| ] |
| |
| deps = [ |
| "//base:base_java", |
| "//base:service_loader_java", |
| "//build/android:build_java", |
| "//third_party/androidx:androidx_annotation_annotation_java", |
| "//third_party/jni_zero:jni_zero_java", |
| ] |
| } |
| |
| robolectric_library("junit") { |
| sources = [ "java/src/org/chromium/components/language/LanguageProfileControllerUnitTest.java" ] |
| deps = [ |
| ":java", |
| "//base:base_java", |
| "//base:base_java_test_support", |
| "//base:base_junit_test_support", |
| "//base:service_loader_java", |
| "//components/browser_ui/widget/android:java", |
| "//content/public/android:content_java", |
| "//content/public/test/android:content_java_test_support", |
| "//third_party/androidx:androidx_test_runner_java", |
| "//third_party/junit", |
| "//third_party/mockito:mockito_java", |
| "//ui/android:ui_java", |
| ] |
| } |
| |
| android_library("javatests") { |
| testonly = true |
| |
| sources = [ "java/src/org/chromium/components/language/AndroidLanguageMetricsBridgeTest.java" ] |
| deps = [ |
| ":java", |
| "//base:base_java", |
| "//base:base_java_test_support", |
| "//chrome/browser/flags:java", |
| "//chrome/test/android:chrome_java_integration_test_support", |
| "//chrome/test/android:chrome_java_transit", |
| "//content/public/test/android:content_java_test_support", |
| "//third_party/androidx:androidx_test_runner_java", |
| "//third_party/junit", |
| ] |
| } |