| # Copyright 2021 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") |
| |
| android_library("java") { |
| srcjar_deps = [ ":jni_headers" ] |
| sources = [ "java/src/org/chromium/components/ukm/UkmRecorder.java" ] |
| |
| deps = [ |
| "//build/android:build_java", |
| "//content/public/android:content_java", |
| "//third_party/androidx:androidx_annotation_annotation_java", |
| "//third_party/jni_zero:jni_zero_java", |
| ] |
| } |
| |
| robolectric_library("ukm_junit_tests") { |
| sources = [ "javatests/src/org/chromium/components/ukm/UkmRecorderTest.java" ] |
| deps = [ |
| ":java", |
| "//base:base_java_test_support", |
| "//base:base_junit_test_support", |
| "//content/public/android:content_java", |
| "//third_party/jni_zero:gendeps_java", |
| "//third_party/junit", |
| "//third_party/mockito:mockito_java", |
| ] |
| } |
| |
| generate_jni("jni_headers") { |
| sources = [ "java/src/org/chromium/components/ukm/UkmRecorder.java" ] |
| } |
| |
| static_library("ukm_recorder") { |
| sources = [ "ukm_recorder.cc" ] |
| deps = [ |
| ":jni_headers", |
| "//base", |
| "//components/ukm/content", |
| "//content/public/browser", |
| "//services/metrics/public/cpp:ukm_builders", |
| ] |
| } |