blob: 571047b708e38e676c8510b7237405fa89fa59b0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.file.Path;
import java.nio.file.Paths;
class Dependency {
final URL url;
final Path path;
final String hash;
public Dependency(String target, String folder, String file, String hash) throws MalformedURLException {
this.path = Paths.get(target + file + ".jar");
this.url = new URL("https://repo1.maven.org/maven2/org/scala-lang/" + folder + "/" + file + ".jar");
this.hash = hash;
}
// scala-lang dependency
public static Dependency scala(String target, String scalaVersion, String scalaModule, String hash)
throws MalformedURLException {
return new Dependency(
target,
"scala-" + scalaModule + "/" + scalaVersion,
"scala-" + scalaModule + "-" + scalaVersion,
hash
);
}
}
|