# 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("subresource_filter_jni_headers") {
sources = [
"java/src/org/chromium/components/subresource_filter/AdsBlockedDialog.java",
"java/src/org/chromium/components/subresource_filter/AdsBlockedInfoBar.java",
"java/src/org/chromium/components/subresource_filter/SubresourceFilterFeatureMap.java",
]
}
android_library("java") {
srcjar_deps = [ ":subresource_filter_jni_headers" ]
sources = [
"java/src/org/chromium/components/subresource_filter/AdsBlockedDialog.java",
"java/src/org/chromium/components/subresource_filter/AdsBlockedInfoBar.java",
"java/src/org/chromium/components/subresource_filter/SubresourceFilterFeatureMap.java",
]
deps = [
":java_resources",
"//base:base_java",
"//build/android:build_java",
"//components/infobars/android:infobar_android_enums_java",
"//components/infobars/android:java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_appcompat_appcompat_java",
"//third_party/jni_zero:jni_zero_java",
"//ui/android:ui_no_recycler_view_java",
]
resources_package = "org.chromium.components.subresource_filter"
}
robolectric_library("junit") {
resources_package = "org.chromium.components.subresource_filter"
sources = [ "java/src/org/chromium/components/subresource_filter/AdsBlockedDialogTest.java" ]
deps = [
":java",
":java_resources",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//third_party/androidx:androidx_test_core_java",
"//third_party/jni_zero:jni_zero_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_no_recycler_view_java",
]
}
source_set("android") {
sources = [
"ads_blocked_dialog.cc",
"ads_blocked_dialog.h",
"subresource_filter_feature_map.cc",
]
deps = [
":subresource_filter_jni_headers",
"//base",
"//components/subresource_filter/core/browser",
"//content/public/browser",
"//ui/android:android",
]
}
android_resources("java_resources") {
sources = [ "java/res/values/ids.xml" ]
deps = [
"//components/browser_ui/strings/android:browser_ui_strings_grd",
"//components/browser_ui/styles/android:java_resources",
"//components/strings:components_strings_grd",
]
}