Skip to content

Commit b3ced63

Browse files
committed
Stop depending on @com_github_jetbrains_kotlin//... targets (#173)
Fixes #173
1 parent 92cb296 commit b3ced63

File tree

13 files changed

+28
-21
lines changed

13 files changed

+28
-21
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ kotlin_test(
192192
deps = [
193193
":binding-adapter-bridge",
194194
":binding-adapter-processor",
195-
"@com_github_jetbrains_kotlin//:kotlin-test",
195+
"@maven//:org_jetbrains_kotlin_kotlin_test",
196196
"@maven//:com_github_tschuchortdev_kotlin_compile_testing",
197197
"@maven//:junit_junit",
198198
],

rules/android/test.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def android_unit_test(
5656
test_runtime_deps = [
5757
":" + runtime_resources_name,
5858
"@grab_bazel_common//rules/android:mock_android_jar",
59-
"@com_github_jetbrains_kotlin//:kotlin-reflect",
59+
"@maven//:org_jetbrains_kotlin_kotlin_reflect",
6060
],
6161
resources = resources,
6262
**kwargs

rules/kotlin/test.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def kotlin_test(
2929
deps = deps,
3030
test_compile_deps = [],
3131
test_runtime_deps = [
32-
"@com_github_jetbrains_kotlin//:kotlin-reflect",
32+
"@maven//:org_jetbrains_kotlin_kotlin_reflect",
3333
],
3434
**kwargs
3535
)

rules/test/multi_test.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def grab_android_local_test(
4949
],
5050
test_runtime_deps = [
5151
"@grab_bazel_common//tools/test:mockable-android-jar",
52-
"@com_github_jetbrains_kotlin//:kotlin-reflect",
52+
"@maven//:org_jetbrains_kotlin_kotlin_reflect",
5353
],
5454
**kwargs
5555
)
@@ -84,7 +84,7 @@ def grab_kt_jvm_test(
8484
deps = deps,
8585
test_compile_deps = [],
8686
test_runtime_deps = [
87-
"@com_github_jetbrains_kotlin//:kotlin-reflect",
87+
"@maven//:org_jetbrains_kotlin_kotlin_reflect",
8888
],
8989
**kwargs
9090
)

tools/aapt_lite/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ kotlin_test(
99
"//tools/aapt_lite/src/main/java/com/grab/aapt",
1010
"//tools/test_utils",
1111
"@bazel_common_maven//:junit_junit",
12-
"@com_github_jetbrains_kotlin//:kotlin-test",
12+
"@maven//:org_jetbrains_kotlin_kotlin_test",
1313
],
1414
)
1515

tools/binding-adapter-bridge/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ kotlin_test(
4646
":binding-adapter-processor",
4747
"@bazel_common_maven//:com_github_tschuchortdev_kotlin_compile_testing",
4848
"@bazel_common_maven//:junit_junit",
49-
"@com_github_jetbrains_kotlin//:kotlin-test",
49+
"@maven//:org_jetbrains_kotlin_kotlin_test",
5050
],
5151
)

tools/build_config/BUILD

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ kotlin_test(
5353
],
5454
deps = [
5555
":build-config-sample",
56-
"@com_github_jetbrains_kotlin//:kotlin-test",
5756
"@maven//:junit_junit",
57+
"@maven//:org_jetbrains_kotlin_kotlin_test",
5858
],
5959
)
6060

@@ -75,7 +75,7 @@ kotlin_test(
7575
],
7676
deps = [
7777
":build-config-replace-default",
78-
"@com_github_jetbrains_kotlin//:kotlin-test",
7978
"@maven//:junit_junit",
79+
"@maven//:org_jetbrains_kotlin_kotlin_test",
8080
],
8181
)

tools/lint/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ kotlin_test(
99
"//tools/lint/src/main/java/com/grab/lint",
1010
"//tools/test_utils",
1111
"@bazel_common_maven//:junit_junit",
12-
"@com_github_jetbrains_kotlin//:kotlin-test",
12+
"@maven//:org_jetbrains_kotlin_kotlin_test",
1313
],
1414
)
1515

tools/test_suite_generator/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ kotlin_test(
3939
deps = [
4040
":test_suite_generator",
4141
"@bazel_common_maven//:junit_junit",
42-
"@com_github_jetbrains_kotlin//:kotlin-test",
42+
"@maven//:org_jetbrains_kotlin_kotlin_test",
4343
],
4444
)

tools/test_suite_generator/README.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,25 @@ For example, you have a bunch of test classes
1212
```kotlin
1313
class DummyTestClassA {
1414
@Test
15-
fun testFeatureA() {}
15+
fun testFeatureA() {
16+
}
1617
}
1718

1819
class DummyTestClassB {
1920
@Test
20-
fun testFeatureB() {}
21+
fun testFeatureB() {
22+
}
2123
}
2224
```
2325

2426
The generated TestSuite class will look like
2527

2628
```java
29+
2730
@RunWith(Suite.class)
2831
@Suite.SuiteClasses({
29-
DummyTestClassA.class,
30-
DummyTestClassB.class
32+
DummyTestClassA.class,
33+
DummyTestClassB.class
3134
})
3235
public class TestSuite {
3336
}
@@ -40,13 +43,15 @@ You simply add the annotation processor as a dependency for your target. Below i
4043
```kotlin
4144
kt_jvm_test(
4245
name = "your-test-target",
43-
srcs = glob([
44-
"..."
45-
]),
46+
srcs = glob(
47+
[
48+
"..."
49+
]
50+
),
4651
test_class = "com.grazel.generated.TestSuite", // Be aware that the package name is hardcoded
4752
deps = [
4853
"@grab_bazel_common//tools/test-info-processor:test-suite-generator",
49-
"@com_github_jetbrains_kotlin//:kotlin-test",
54+
"@maven//:org_jetbrains_kotlin_kotlin_test",
5055
"@maven//:junit_junit",
5156
],
5257
)

tools/test_utils/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ kotlin_library(
1010
],
1111
deps = [
1212
"@bazel_common_maven//:junit_junit",
13-
"@com_github_jetbrains_kotlin//:kotlin-test",
13+
"@maven//:org_jetbrains_kotlin_kotlin_test",
1414
],
1515
)

tools/worker/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ kotlin_test(
2828
deps = [
2929
":worker_lib",
3030
"@bazel_common_maven//:junit_junit",
31-
"@com_github_jetbrains_kotlin//:kotlin-test",
31+
"@maven//:org_jetbrains_kotlin_kotlin_test",
3232
],
3333
)

workspace_defs.bzl

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
GRAB_BAZEL_COMMON_ARTIFACTS = [
22
"org.jetbrains.kotlin:kotlin-parcelize-compiler:1.8.10",
33
"org.jetbrains.kotlin:kotlin-parcelize-runtime:1.8.10",
4+
"org.jetbrains.kotlin:kotlin-reflect:1.8.10",
5+
"org.jetbrains.kotlin:kotlin-test:1.8.10",
46
"androidx.compose.compiler:compiler:1.4.3",
57
"androidx.annotation:annotation:1.5.0",
68
"androidx.databinding:databinding-adapters:7.2.2",

0 commit comments

Comments
 (0)