@@ -29,64 +29,65 @@ load("@android_test_support//:repo.bzl", "android_test_repositories")
29
29
30
30
android_test_repositories ()
31
31
32
- # Google Maven Repository
33
- # This repository contains the external dependency definitions for Google Maven artifacts.
34
- GMAVEN_TAG = "20181206-1"
35
-
36
- http_archive (
37
- name = "gmaven_rules" ,
38
- strip_prefix = "gmaven_rules-%s" % GMAVEN_TAG ,
39
- url = "https://github.com/bazelbuild/gmaven_rules/archive/%s.tar.gz" % GMAVEN_TAG ,
40
- )
41
-
42
- load ("@gmaven_rules//:gmaven.bzl" , "gmaven_rules" )
43
-
44
- gmaven_rules ()
45
-
46
- jvm_maven_import_external (
47
- name = "com_google_inject_guice" ,
48
- server_urls = ["http://central.maven.org/maven2" ],
49
- licenses = ["notice" ], # Apache 2.0
50
- artifact = "com.google.inject:guice:4.0" ,
51
- artifact_sha256 = "b378ffc35e7f7125b3c5f3a461d4591ae1685e3c781392f0c854ed7b7581d6d2" ,
52
- )
32
+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
53
33
54
- jvm_maven_import_external (
55
- name = "junit_junit" ,
56
- server_urls = ["http://central.maven.org/maven2" ],
57
- licenses = ["notice" ], # Apache 2.0
58
- artifact = "junit:junit:4.12" ,
59
- artifact_sha256 = "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a" ,
60
- )
34
+ RULES_JVM_EXTERNAL_TAG = "1.0"
35
+ RULES_JVM_EXTERNAL_SHA = "48e0f1aab74fabba98feb8825459ef08dcc75618d381dff63ec9d4dd9860deaa"
61
36
62
- jvm_maven_import_external (
63
- name = "javax_inject_javax_inject" ,
64
- server_urls = ["http://central.maven.org/maven2" ],
65
- licenses = ["notice" ], # Apache 2.0
66
- artifact = "javax.inject:javax.inject:1" ,
67
- artifact_sha256 = "91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff" ,
37
+ http_archive (
38
+ name = "rules_jvm_external" ,
39
+ strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG ,
40
+ sha256 = RULES_JVM_EXTERNAL_SHA ,
41
+ url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG ,
68
42
)
69
43
70
- jvm_maven_import_external (
71
- name = "org_hamcrest_java_hamcrest" ,
72
- server_urls = ["http://central.maven.org/maven2" ],
73
- licenses = ["notice" ], # Apache 2.0
74
- artifact = "org.hamcrest:java-hamcrest:2.0.0.0" ,
75
- artifact_sha256 = "09bc7044d57a497846e2480250e7a72ff3ae58efefc8c3a9ceecd0f4e092851c" ,
44
+ # Keeping a copy of gmaven_rules around so dependencies can use it
45
+ # TODO(jin): remove this when android/android-test no longer depends on gmaven_rules.
46
+ http_archive (
47
+ name = "gmaven_rules" ,
48
+ strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG ,
49
+ sha256 = RULES_JVM_EXTERNAL_SHA ,
50
+ url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG ,
76
51
)
77
52
78
- jvm_maven_import_external (
79
- name = "com_google_guava_guava" ,
80
- server_urls = ["http://central.maven.org/maven2" ],
81
- licenses = ["notice" ], # Apache 2.0
82
- artifact = "com.google.guava:guava:26.0-android" ,
83
- artifact_sha256 = "1d044ebb866ef08b7d04e998b4260c9b52fab6e6d6b68d207859486bb3686cd5" ,
53
+ load ("@rules_jvm_external//:defs.bzl" , "maven_install" )
54
+ load ("//:common_defs.bzl" ,
55
+ "androidxLibVersion" ,
56
+ "coreVersion" ,
57
+ "espressoVersion" ,
58
+ "extJUnitVersion" ,
59
+ "extTruthVersion" ,
60
+ "rulesVersion" ,
61
+ "runnerVersion" ,
62
+ "uiAutomatorVersion" ,
84
63
)
85
64
86
- jvm_maven_import_external (
87
- name = "truth" ,
88
- server_urls = ["http://central.maven.org/maven2" ],
89
- licenses = ["notice" ], # Apache 2.0
90
- artifact = "com.google.truth:truth:0.42" ,
91
- artifact_sha256 = "dd652bdf0c4427c59848ac0340fd6b6d20c2cbfaa3c569a8366604dbcda5214c" ,
65
+ maven_install (
66
+ name = "maven" ,
67
+ artifacts = [
68
+ "androidx.annotation:annotation:" + androidxLibVersion ,
69
+ "androidx.core:core:" + androidxLibVersion ,
70
+ "androidx.recyclerview:recyclerview:" + androidxLibVersion ,
71
+ "androidx.test:core:" + coreVersion ,
72
+ "androidx.test.espresso:espresso-contrib:" + espressoVersion ,
73
+ "androidx.test.espresso:espresso-core:" + espressoVersion ,
74
+ "androidx.test.espresso:espresso-idling-resource:" + espressoVersion ,
75
+ "androidx.test.espresso:espresso-intents:" + espressoVersion ,
76
+ "androidx.test.ext:junit:" + extJUnitVersion ,
77
+ "androidx.test.ext:truth:" + extTruthVersion ,
78
+ "androidx.test:monitor:" + runnerVersion ,
79
+ "androidx.test:rules:" + rulesVersion ,
80
+ "androidx.test:runner:" + runnerVersion ,
81
+ "androidx.test.uiautomator:uiautomator:" + uiAutomatorVersion ,
82
+ "com.google.inject:guice:4.0" ,
83
+ "junit:junit:4.12" ,
84
+ "javax.inject:javax.inject:1" ,
85
+ "org.hamcrest:java-hamcrest:2.0.0.0" ,
86
+ "com.google.guava:guava:26.0-android" ,
87
+ "com.google.truth:truth:0.42" ,
88
+ ],
89
+ repositories = [
90
+ "https://maven.google.com" ,
91
+ "https://repo1.maven.org/maven2" ,
92
+ ],
92
93
)
0 commit comments