1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# Copyright 2020 The Chromium Authors. All rights reserved.
# 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")
android_library("java") {
sources = [
"android/java/src/org/chromium/chrome/browser/flags/BooleanCachedFieldTrialParameter.java",
"android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java",
"android/java/src/org/chromium/chrome/browser/flags/CachedFieldTrialParameter.java",
"android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java",
"android/java/src/org/chromium/chrome/browser/flags/DoubleCachedFieldTrialParameter.java",
"android/java/src/org/chromium/chrome/browser/flags/FeatureParamUtils.java",
"android/java/src/org/chromium/chrome/browser/flags/IntCachedFieldTrialParameter.java",
"android/java/src/org/chromium/chrome/browser/flags/StringCachedFieldTrialParameter.java",
]
deps = [
"//base:base_java",
"//base:jni_java",
"//chrome/browser/preferences:java",
"//third_party/android_deps:androidx_annotation_annotation_java",
]
srcjar_deps = [ ":chrome_android_java_switches_srcjar" ]
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
}
generate_jni("jni_headers") {
sources = [
"android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java",
"android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java",
]
}
static_library("flags_android") {
sources = [
"android/cached_feature_flags.cc",
"android/cached_feature_flags.h",
]
deps = [
":jni_headers",
"//base",
"//content/public/common",
]
}
java_cpp_strings("chrome_android_java_switches_srcjar") {
sources = [ "//chrome/common/chrome_switches.cc" ]
template = "android/java_templates/ChromeSwitches.java.tmpl"
}
java_library("flags_junit_tests") {
# Skip platform checks since Robolectric depends on requires_android targets.
bypass_platform_checks = true
testonly = true
sources = [
"android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlagsAnnotationUnitTest.java",
"android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlagsUnitTest.java",
"android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureListWithProcessorUnitTest.java",
"android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureListWithoutProcessorUnitTest.java",
"android/java/src/org/chromium/chrome/browser/flags/FeatureParamUtilsUnitTest.java",
]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//base/test:test_support_java",
"//chrome/test/android:chrome_java_test_support",
"//third_party/android_deps:robolectric_all_java",
"//third_party/junit",
]
}
android_library("javatests") {
testonly = true
sources = [
"android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureListInstrumentationTest.java",
"android/java/src/org/chromium/chrome/browser/flags/FieldTrialsInstrumentationTest.java",
]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//base/test:test_support_java",
"//chrome/android:chrome_java",
"//chrome/test/android:chrome_java_test_support",
"//third_party/android_deps:androidx_test_runner_java",
"//third_party/android_sdk:android_test_mock_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
]
}
|