@@ -24,7 +24,6 @@ maven_install(
2424 artifacts = [
2525 "junit:junit:4.13.2" ,
2626 "org.hamcrest:hamcrest:2.2" ,
27- "com.github.ipld:java-cid:v1.3.8" ,
2827 ],
2928 repositories = [
3029 # Private repositories are supported through HTTP Basic auth
@@ -45,9 +44,9 @@ java_library(
4544 name = "core",
4645 srcs = [":main_srcs"],
4746 deps = [
48- "@maven //:com_github_multiformats_java_multihash ",
49- "@maven //:com_github_multiformats_java_multibase ",
50- "@maven //:com_github_ipld_java_cid ",
47+ "@multihash //:core ",
48+ "@multibase //:core ",
49+ "@cid //:core ",
5150 ],
5251 visibility = ["//visibility:public"],
5352)
@@ -58,4 +57,71 @@ new_git_repository(
5857 remote = "https://github.com/multiformats/java-multiaddr.git" ,
5958 tag = "v1.4.12" ,
6059 build_file_content = MULTIADDR_BUILD_FILE ,
60+ )
61+
62+ MULTIHASH_BUILD_FILE = """
63+ filegroup(
64+ name = "main_srcs",
65+ srcs = glob(["src/main/java/**"]),
66+ )
67+
68+ java_library(
69+ name = "core",
70+ srcs = [":main_srcs"],
71+ deps = [
72+ "@multibase//:core",
73+ ],
74+ visibility = ["//visibility:public"],
75+ )
76+ """
77+
78+ new_git_repository (
79+ name = "multihash" ,
80+ remote = "https://github.com/multiformats/java-multihash.git" ,
81+ tag = "v1.3.4" ,
82+ build_file_content = MULTIHASH_BUILD_FILE ,
83+ )
84+
85+ MULTIBASE_BUILD_FILE = """
86+ filegroup(
87+ name = "main_srcs",
88+ srcs = glob(["src/main/java/**"]),
89+ )
90+
91+ java_library(
92+ name = "core",
93+ srcs = [":main_srcs"],
94+ visibility = ["//visibility:public"],
95+ )
96+ """
97+
98+ new_git_repository (
99+ name = "multibase" ,
100+ remote = "https://github.com/multiformats/java-multibase.git" ,
101+ tag = "v1.1.1" ,
102+ build_file_content = MULTIBASE_BUILD_FILE ,
103+ )
104+
105+ CID_BUILD_FILE = """
106+ filegroup(
107+ name = "main_srcs",
108+ srcs = glob(["src/main/java/**"]),
109+ )
110+
111+ java_library(
112+ name = "core",
113+ srcs = [":main_srcs"],
114+ deps = [
115+ "@multihash//:core",
116+ "@multibase//:core",
117+ ],
118+ visibility = ["//visibility:public"],
119+ )
120+ """
121+
122+ new_git_repository (
123+ name = "cid" ,
124+ remote = "https://github.com/ipld/java-cid.git" ,
125+ tag = "v1.3.8" ,
126+ build_file_content = CID_BUILD_FILE ,
61127)
0 commit comments