-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.gradle
45 lines (38 loc) · 999 Bytes
/
build.gradle
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
plugins {
id 'java'
id 'application'
}
repositories {
mavenCentral()
}
def etherSolveJar = layout.buildDirectory.file('libs/EtherSolve.jar')
tasks.register('downloadEtherSolve') {
outputs.file etherSolveJar
doLast {
def f = etherSolveJar.get().asFile
f.parentFile.mkdirs()
new URL('https://github.com/SeUniVr/EtherSolve/raw/main/artifact/EtherSolve.jar')
.withInputStream { inputStream ->
f.withOutputStream { it << inputStream }
}
}
}
dependencies {
implementation files(etherSolveJar)
implementation 'com.google.code.gson:gson:2.10.1'
}
tasks.named('compileJava') {
dependsOn 'downloadEtherSolve'
}
application {
mainClass = 'HelloEtherSolve'
}
jar {
manifest {
attributes 'Main-Class': application.mainClass
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}