-
Notifications
You must be signed in to change notification settings - Fork 526
/
BUILD.bazel
232 lines (203 loc) · 8.88 KB
/
BUILD.bazel
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# TODO(#1532): Rename file to 'BUILD' post-Gradle.
"""
This library contains the frontend controller and business service logic for the application.
"""
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library")
load("@rules_jvm_external//:defs.bzl", "artifact")
load("@dagger//:workspace_defs.bzl", "dagger_rules")
load("//domain:domain_test.bzl", "domain_test")
kt_android_library(
name = "domain",
srcs = glob(["src/main/java/org/oppia/android/domain/**/*.kt"]),
assets = glob(["src/main/assets/**"]),
assets_dir = "src/main/assets/",
custom_package = "org.oppia.android.domain",
manifest = "src/main/AndroidManifest.xml",
visibility = ["//visibility:public"],
deps = [
":dagger",
"//data:persistent_cache_store",
artifact("androidx.work:work-runtime-ktx:2.4.0"),
],
)
TEST_DEPS = [
":dagger",
":domain",
"//data:persistent_cache_store",
"//model",
"//testing",
"@robolectric//bazel:android-all",
artifact("androidx.arch.core:core-testing"),
artifact("androidx.test.ext:junit"),
artifact("androidx.work:work-testing"),
artifact("com.google.truth:truth"),
artifact("org.jetbrains.kotlin:kotlin-test-junit"),
artifact("org.jetbrains.kotlin:kotlin-reflect"),
]
domain_test(
name = "AudioPlayerControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/audio/AudioPlayerControllerTest.kt"],
test_class = "org.oppia.android.domain.audio.AudioPlayerControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "CellularAudioDialogControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/audio/CellularAudioDialogControllerTest.kt"],
test_class = "org.oppia.android.domain.audio.CellularAudioDialogControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "AnswerClassificationControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/classify/AnswerClassificationControllerTest.kt"],
test_class = "org.oppia.android.domain.classify.AnswerClassificationControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "NumericInputEqualsRuleClassifierProviderTest",
srcs = ["src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputEqualsRuleClassifierProviderTest.kt"],
test_class = "org.oppia.android.domain.classify.rules.numericinput.NumericInputEqualsRuleClassifierProviderTest",
deps = TEST_DEPS,
)
domain_test(
name = "DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest",
srcs = [
"src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest.kt",
],
test_class = "org.oppia.android.domain.classify.rules.dragAndDropSortInput.DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest",
deps = TEST_DEPS,
)
domain_test(
name = "DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest",
srcs = [
"src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest.kt",
],
test_class = "org.oppia.android.domain.classify.rules.dragAndDropSortInput.DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest",
deps = TEST_DEPS,
)
domain_test(
name = "DragDropSortInputIsEqualToOrderingClassifierProviderTest",
srcs = [
"src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingClassifierProviderTest.kt",
],
test_class = "org.oppia.android.domain.classify.rules.dragAndDropSortInput.DragDropSortInputIsEqualToOrderingClassifierProviderTest",
deps = TEST_DEPS,
)
domain_test(
name = "DragDropSortInputIsEqualToOrderingWithOneItemAtIncorrectPositionClassifierProviderTest",
srcs = [
"src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingWithOneItemAtIncorrectPositionClassifierProviderTest.kt",
],
test_class = "org.oppia.android.domain.classify.rules.dragAndDropSortInput.DragDropSortInputIsEqualToOrderingWithOneItemAtIncorrectPositionClassifierProviderTest",
deps = TEST_DEPS,
)
domain_test(
name = "ImageClickInputIsInRegionRuleClassifierProviderTest",
srcs = [
"src/test/java/org/oppia/android/domain/classify/rules/imageClickInput/ImageClickInputIsInRegionRuleClassifierProviderTest.kt",
],
test_class = "org.oppia.android.domain.classify.rules.imageClickInput.ImageClickInputIsInRegionRuleClassifierProviderTest",
deps = TEST_DEPS,
)
domain_test(
name = "MultipleChoiceInputEqualsRuleClassifierProviderTest",
srcs = [
"src/test/java/org/oppia/android/domain/classify/rules/multiplechoiceinput/MultipleChoiceInputEqualsRuleClassifierProviderTest.kt",
],
test_class = "org.oppia.android.domain.classify.rules.multiplechoiceinput.MultipleChoiceInputEqualsRuleClassifierProviderTest",
deps = TEST_DEPS,
)
domain_test(
name = "TextInputContainsRuleClassifierProviderTest",
srcs = [
"src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputContainsRuleClassifierProviderTest.kt",
],
test_class = "org.oppia.android.domain.classify.rules.textinput.TextInputContainsRuleClassifierProviderTest",
deps = TEST_DEPS,
)
domain_test(
name = "TextInputEqualsRuleClassifierProviderTest",
srcs = [
"src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputEqualsRuleClassifierProviderTest.kt",
],
test_class = "org.oppia.android.domain.classify.rules.textinput.TextInputEqualsRuleClassifierProviderTest",
deps = TEST_DEPS,
)
domain_test(
name = "ExplorationDataControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/exploration/ExplorationDataControllerTest.kt"],
test_class = "org.oppia.android.domain.exploration.ExplorationDataControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "ExplorationProgressControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/exploration/ExplorationProgressControllerTest.kt"],
test_class = "org.oppia.android.domain.exploration.ExplorationProgressControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "AppStartupStateControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/onboarding/AppStartupStateControllerTest.kt"],
test_class = "org.oppia.android.domain.onboarding.AppStartupStateControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "AnalyticsControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/oppialogger/analytics/AnalyticsControllerTest.kt"],
test_class = "org.oppia.android.domain.oppialogger.analytics.AnalyticsControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "ProfileManagementControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/profile/ProfileManagementControllerTest.kt"],
test_class = "org.oppia.android.domain.profile.ProfileManagementControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "QuestionAssessmentProgressControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/question/QuestionAssessmentProgressControllerTest.kt"],
test_class = "org.oppia.android.domain.question.QuestionAssessmentProgressControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "QuestionTrainingControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/question/QuestionTrainingControllerTest.kt"],
test_class = "org.oppia.android.domain.question.QuestionTrainingControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "StoryProgressControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/topic/StoryProgressControllerTest.kt"],
test_class = "org.oppia.android.domain.topic.StoryProgressControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "StoryProgressTestHelperTest",
srcs = ["src/test/java/org/oppia/android/domain/topic/StoryProgressTestHelperTest.kt"],
test_class = "org.oppia.android.domain.topic.StoryProgressTestHelperTest",
deps = TEST_DEPS,
)
domain_test(
name = "TopicControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/topic/TopicControllerTest.kt"],
test_class = "org.oppia.android.domain.topic.TopicControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "TopicListControllerTest",
srcs = ["src/test/java/org/oppia/android/domain/topic/TopicListControllerTest.kt"],
test_class = "org.oppia.android.domain.topic.TopicListControllerTest",
deps = TEST_DEPS,
)
domain_test(
name = "InteractionObjectExtensionsTest",
srcs = ["src/test/java/org/oppia/android/domain/util/InteractionObjectExtensionsTest.kt"],
test_class = "org.oppia.android.domain.util.InteractionObjectExtensionsTest",
deps = TEST_DEPS,
)
domain_test(
name = "StateRetrieverTest",
srcs = ["src/test/java/org/oppia/android/domain/util/StateRetrieverTest.kt"],
test_class = "org.oppia.android.domain.util.StateRetrieverTest",
deps = TEST_DEPS,
)
dagger_rules()