-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathbuild.gradle
46 lines (40 loc) · 1.12 KB
/
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
46
apply plugin: 'java'
repositories {
mavenCentral()
}
// most of the jar libraries is available in the /dependencies folder, not in a remote repository
dependencies {
compile fileTree(dir: 'dependencies', include: ['*.jar'])
compile 'com.google.guava:guava:26.0-jre'
compile 'com.beust:jcommander:1.78'
compile 'com.github.spotbugs:spotbugs-annotations:3.1.8'
compile 'org.javatuples:javatuples:1.2'
testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:3.11.0'
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '2.2'
}
// the lines bellow deal with exporting a running jar
jar {
manifest {
attributes 'Main-Class': 'br.ufpe.cin.app.JFSTMerge'
}
}
task fatJar(type: Jar) {
manifest.from jar.manifest
classifier = 'all'
from {
configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
with jar
}
artifacts {
archives fatJar
}
// Disabling asserts.
tasks.withType(Test) {
enableAssertions = false
}