File tree Expand file tree Collapse file tree 3 files changed +26
-8
lines changed
Expand file tree Collapse file tree 3 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 1- maven_jar (
2- name = "com_google_guava_guava" ,
3- artifact = "com.google.guava:guava:18.0" ,
4- sha1 = "cce0823396aa693798f8882e64213b1772032b09" ,
5- sha1_src = "ad97fe8faaf01a3d3faacecd58e8fa6e78a973ca" ,
1+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
2+
3+ RULES_JVM_EXTERNAL_TAG = "2.8"
4+ RULES_JVM_EXTERNAL_SHA = "79c9850690d7614ecdb72d68394f994fef7534b292c4867ce5e7dec0aa7bdfad"
5+
6+ http_archive (
7+ name = "rules_jvm_external" ,
8+ strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG ,
9+ sha256 = RULES_JVM_EXTERNAL_SHA ,
10+ url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG ,
11+ )
12+
13+ load ("@rules_jvm_external//:defs.bzl" , "maven_install" )
14+
15+ maven_install (
16+ artifacts = [
17+ "com.google.guava:guava:18.0" ,
18+ ],
19+ repositories = [
20+ "https://jcenter.bintray.com/" ,
21+ "https://repo1.maven.org/maven2" ,
22+ ],
23+ fetch_sources = True ,
624)
Original file line number Diff line number Diff line change @@ -4,6 +4,6 @@ java_binary(
44 main_class = "Hello" ,
55 visibility = ["//visibility:public" ],
66 deps = [
7- "@com_google_guava_guava//jar " ,
7+ "@maven//:com_google_guava_guava " ,
88 ],
99)
Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ public class InferBazelConfigTest {
1010 @ Test
1111 public void bazelClassPath () {
1212 var bazel = new InferConfig (Paths .get ("src/test/examples/bazel-project" ));
13- assertThat (bazel .classPath (), contains (hasToString (endsWith ("guava-18.0-ijar .jar" ))));
13+ assertThat (bazel .classPath (), contains (hasToString (endsWith ("guava-18.0.jar" ))));
1414 }
1515
1616 @ Test
1717 public void bazelClassPathInSubdir () {
1818 var bazel = new InferConfig (Paths .get ("src/test/examples/bazel-project/hello" ));
19- assertThat (bazel .classPath (), contains (hasToString (endsWith ("guava-18.0-ijar .jar" ))));
19+ assertThat (bazel .classPath (), contains (hasToString (endsWith ("guava-18.0.jar" ))));
2020 }
2121
2222 @ Test
You can’t perform that action at this time.
0 commit comments