# Copyright 2014 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("variations_jni") {
sources = [
"java/src/org/chromium/components/variations/VariationsAssociatedData.java",
"java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java",
]
}
android_library("variations_java") {
deps = [
"//base:base_java",
"//build/android:build_java",
"//components/variations:variations_java",
"//components/variations/proto:proto_java",
"//net/android:net_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/jni_zero:jni_zero_java",
]
srcjar_deps = [ ":variations_jni" ]
sources = [
"java/src/org/chromium/components/variations/NormalizedMurmurHashEntropyProvider.java",
"java/src/org/chromium/components/variations/VariationsAssociatedData.java",
"java/src/org/chromium/components/variations/VariationsCompressionUtils.java",
"java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java",
"java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java",
]
}
generate_jni("test_support_jni_headers") {
testonly = true
sources = [ "javatests/src/org/chromium/components/variations/NormalizedMurmurHashEntropyProviderTestUtilsBridge.java" ]
}
static_library("test_support") {
testonly = true
sources = [ "normalized_murmur_hash_entropy_provider_test_utils_bridge.cc" ]
deps = [
":test_support_jni_headers",
"//base",
"//components/variations",
]
}
android_library("test_support_java") {
testonly = true
srcjar_deps = [ ":test_support_jni_headers" ]
sources = [ "javatests/src/org/chromium/components/variations/NormalizedMurmurHashEntropyProviderTestUtilsBridge.java" ]
deps = [
"//build/android:build_java",
"//third_party/jni_zero:jni_zero_java",
]
}
android_library("unit_device_javatests") {
testonly = true
sources = [ "javatests/src/org/chromium/components/variations/NormalizedMurmurHashEntropyProviderTest.java" ]
deps = [
":test_support_java",
":variations_java",
"//base:base_java_test_support",
"//chrome/test/android:chrome_java_integration_test_support",
"//components/metrics:metrics_java",
"//content/public/test/android:content_java_test_support",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/junit",
]
}
robolectric_library("components_variations_junit_tests") {
sources = [
"junit/src/org/chromium/components/variations/VariationsCompressionUtilsTest.java",
"junit/src/org/chromium/components/variations/firstrun/VariationsSeedFetcherTest.java",
]
deps = [
":variations_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//components/variations:variations_java",
"//components/variations/proto:proto_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/hamcrest:hamcrest_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
]
}