@@ -5,6 +5,7 @@ This file lists and imports all external dependencies needed to build Oppia Andr
5
5
load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
6
6
load ("@bazel_tools//tools/build_defs/repo:jvm.bzl" , "jvm_maven_import_external" )
7
7
load ("@bazel_tools//tools/build_defs/repo:git.bzl" , "git_repository" )
8
+ load ("//third_party:versions.bzl" , "HTTP_DEPENDENCY_VERSIONS" , "get_maven_dependencies" )
8
9
9
10
# Android SDK configuration. For more details, see:
10
11
# https://docs.bazel.build/versions/master/be/android.html#android_sdk_repository
@@ -15,26 +16,18 @@ android_sdk_repository(
15
16
)
16
17
17
18
# Add support for JVM rules: https://github.com/bazelbuild/rules_jvm_external
18
- RULES_JVM_EXTERNAL_TAG = "2.9"
19
-
20
- RULES_JVM_EXTERNAL_SHA = "e5b97a31a3e8feed91636f42e19b11c49487b85e5de2f387c999ea14d77c7f45"
21
-
22
19
http_archive (
23
20
name = "rules_jvm_external" ,
24
- sha256 = RULES_JVM_EXTERNAL_SHA ,
25
- strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG ,
26
- url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG ,
21
+ sha256 = HTTP_DEPENDENCY_VERSIONS [ "rules_jvm" ][ "sha" ] ,
22
+ strip_prefix = "rules_jvm_external-%s" % HTTP_DEPENDENCY_VERSIONS [ "rules_jvm" ][ "version" ] ,
23
+ url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % HTTP_DEPENDENCY_VERSIONS [ "rules_jvm" ][ "version" ] ,
27
24
)
28
25
29
26
# Add support for Kotlin: https://github.com/bazelbuild/rules_kotlin.
30
- RULES_KOTLIN_VERSION = "v1.5.0-alpha-2"
31
-
32
- RULES_KOTLIN_SHA = "6194a864280e1989b6d8118a4aee03bb50edeeae4076e5bc30eef8a98dcd4f07"
33
-
34
27
http_archive (
35
28
name = "io_bazel_rules_kotlin" ,
36
- sha256 = RULES_KOTLIN_SHA ,
37
- urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/%s/rules_kotlin_release.tgz" % RULES_KOTLIN_VERSION ],
29
+ sha256 = HTTP_DEPENDENCY_VERSIONS [ "rules_kotlin" ][ "sha" ] ,
30
+ urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/%s/rules_kotlin_release.tgz" % HTTP_DEPENDENCY_VERSIONS [ "rules_kotlin" ][ "version" ] ],
38
31
)
39
32
40
33
# TODO(#1535): Remove once rules_kotlin is released because these lines become unnecessary
@@ -54,6 +47,7 @@ module while helping us avoid the unnecessary compilation of protoc. Referecence
54
47
- https://github.com/google/startup-os/blob/5f30a62/WORKSPACE#L179-L187
55
48
- https://github.com/bazelbuild/bazel/issues/7095
56
49
"""
50
+
57
51
bind (
58
52
name = "proto_compiler" ,
59
53
actual = "//tools:protoc" ,
67
61
# The rules_java contains the java_lite_proto_library rule used in the model module.
68
62
http_archive (
69
63
name = "rules_java" ,
70
- sha256 = "220b87d8cfabd22d1c6d8e3cdb4249abd4c93dcc152e0667db061fb1b957ee68" ,
71
- url = "https://github.com/bazelbuild/rules_java/releases/download/0.1.1 /rules_java-0.1.1. tar.gz" ,
64
+ sha256 = HTTP_DEPENDENCY_VERSIONS [ "rules_java" ][ "sha" ] ,
65
+ url = "https://github.com/bazelbuild/rules_java/releases/download/{0} /rules_java-{0}. tar.gz" . format ( HTTP_DEPENDENCY_VERSIONS [ "rules_java" ][ "version" ]) ,
72
66
)
73
67
74
68
load ("@rules_java//java:repositories.bzl" , "rules_java_dependencies" , "rules_java_toolchains" )
@@ -80,9 +74,9 @@ rules_java_toolchains()
80
74
# The rules_proto contains the proto_library rule used in the model module.
81
75
http_archive (
82
76
name = "rules_proto" ,
83
- sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208" ,
84
- strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313" ,
85
- urls = ["https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313 .tar.gz" ],
77
+ sha256 = HTTP_DEPENDENCY_VERSIONS [ "rules_proto" ][ "sha" ] ,
78
+ strip_prefix = "rules_proto-%s" % HTTP_DEPENDENCY_VERSIONS [ "rules_proto" ][ "version" ] ,
79
+ urls = ["https://github.com/bazelbuild/rules_proto/archive/%s .tar.gz" % HTTP_DEPENDENCY_VERSIONS [ "rules_proto" ][ "version" ] ],
86
80
)
87
81
88
82
load ("@rules_proto//proto:repositories.bzl" , "rules_proto_dependencies" , "rules_proto_toolchains" )
@@ -92,15 +86,11 @@ rules_proto_dependencies()
92
86
rules_proto_toolchains ()
93
87
94
88
# Add support for Dagger
95
- DAGGER_TAG = "2.28.1"
96
-
97
- DAGGER_SHA = "9e69ab2f9a47e0f74e71fe49098bea908c528aa02fa0c5995334447b310d0cdd"
98
-
99
89
http_archive (
100
90
name = "dagger" ,
101
- sha256 = DAGGER_SHA ,
102
- strip_prefix = "dagger-dagger-%s" % DAGGER_TAG ,
103
- urls = ["https://github.com/google/dagger/archive/dagger-%s.zip" % DAGGER_TAG ],
91
+ sha256 = HTTP_DEPENDENCY_VERSIONS [ "dagger" ][ "sha" ] ,
92
+ strip_prefix = "dagger-dagger-%s" % HTTP_DEPENDENCY_VERSIONS [ "dagger" ][ "version" ] ,
93
+ urls = ["https://github.com/google/dagger/archive/dagger-%s.zip" % HTTP_DEPENDENCY_VERSIONS [ "dagger" ][ "version" ] ],
104
94
)
105
95
106
96
load ("@dagger//:workspace_defs.bzl" , "DAGGER_ARTIFACTS" , "DAGGER_REPOSITORIES" )
@@ -140,71 +130,9 @@ bind(
140
130
141
131
load ("@rules_jvm_external//:defs.bzl" , "maven_install" )
142
132
133
+ # Note to developers: new dependencies should be added to //third_party:versions.bzl, not here.
143
134
maven_install (
144
- artifacts = DAGGER_ARTIFACTS + [
145
- "android.arch.core:core-testing:1.1.1" ,
146
- "androidx.annotation:annotation:1.1.0" ,
147
- "androidx.appcompat:appcompat:1.0.2" ,
148
- "androidx.arch.core:core-testing:2.1.0" ,
149
- "androidx.constraintlayout:constraintlayout:1.1.3" ,
150
- "androidx.core:core-ktx:1.0.1" ,
151
- "androidx.core:core:1.0.1" ,
152
- "androidx.databinding:databinding-adapters:3.4.2" ,
153
- "androidx.databinding:databinding-common:3.4.2" ,
154
- "androidx.databinding:databinding-compiler:3.4.2" ,
155
- "androidx.databinding:databinding-runtime:3.4.2" ,
156
- "androidx.lifecycle:lifecycle-extensions:2.2.0" ,
157
- "androidx.lifecycle:lifecycle-livedata-core:2.2.0" ,
158
- "androidx.lifecycle:lifecycle-livedata-ktx:2.2.0" ,
159
- "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0" ,
160
- "androidx.multidex:multidex-instrumentation:2.0.0" ,
161
- "androidx.multidex:multidex:2.0.1" ,
162
- "androidx.navigation:navigation-fragment:2.0.0" ,
163
- "androidx.navigation:navigation-fragment-ktx:2.0.0" ,
164
- "androidx.navigation:navigation-ui:2.0.0" ,
165
- "androidx.navigation:navigation-ui-ktx:2.0.0" ,
166
- "androidx.recyclerview:recyclerview:1.0.0" ,
167
- "androidx.room:room-runtime:2.2.5" ,
168
- "androidx.test.espresso:espresso-contrib:3.1.0" ,
169
- "androidx.test.espresso:espresso-core:3.2.0" ,
170
- "androidx.test.espresso:espresso-intents:3.1.0" ,
171
- "androidx.test.ext:junit:1.1.1" ,
172
- "androidx.test:runner:1.2.0" ,
173
- "androidx.viewpager:viewpager:1.0.0" ,
174
- "androidx.work:work-runtime:2.4.0" ,
175
- "androidx.work:work-runtime-ktx:2.4.0" ,
176
- "androidx.work:work-testing:2.4.0" ,
177
- "com.android.support:support-annotations:28.0.0" ,
178
- "com.caverock:androidsvg-aar:1.4" ,
179
- "com.chaos.view:pinview:1.4.4" ,
180
- "com.crashlytics.sdk.android:crashlytics:2.9.8" ,
181
- "com.github.bumptech.glide:glide:4.11.0" ,
182
- "com.github.bumptech.glide:mocks:4.11.0" ,
183
- "com.google.android:flexbox:2.0.1" ,
184
- "com.google.android.material:material:1.2.0-alpha02" ,
185
- "com.google.firebase:firebase-analytics:17.5.0" ,
186
- "com.google.firebase:firebase-crashlytics:17.1.1" ,
187
- "com.google.gms:google-services:4.3.3" ,
188
- "com.google.guava:guava:28.1-android" ,
189
- "com.google.truth:truth:0.43" ,
190
- "com.squareup.retrofit2:converter-gson:2.5.0" ,
191
- "com.squareup.retrofit2:retrofit:2.9.0" ,
192
- "de.hdodenhof:circleimageview:3.0.1" ,
193
- "io.fabric.sdk.android:fabric:1.4.7" ,
194
- "javax.annotation:javax.annotation-api:jar:1.3.2" ,
195
- "junit:junit:4.12" ,
196
- "nl.dionsegijn:konfetti:1.2.5" ,
197
- "org.jetbrains.kotlin:kotlin-reflect:1.3.41" ,
198
- "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.3.72" ,
199
- "org.jetbrains.kotlin:kotlin-test-junit:1.3.72" ,
200
- "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2" ,
201
- "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.2" ,
202
- "org.jetbrains:annotations:jar:13.0" ,
203
- "org.mockito:mockito-core:2.19.0" ,
204
- "org.mockito:mockito-core:2.7.22" ,
205
- "org.robolectric:annotations:4.3" ,
206
- "org.robolectric:robolectric:4.3" ,
207
- ],
135
+ artifacts = DAGGER_ARTIFACTS + get_maven_dependencies (),
208
136
repositories = DAGGER_REPOSITORIES + [
209
137
"https://bintray.com/bintray/jcenter" ,
210
138
"https://jcenter.bintray.com/" ,
0 commit comments