-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
60 lines (48 loc) · 1.36 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'application'
version = file('src/main/resources/version.txt').text.trim()
repositories {
jcenter()
}
dependencies {
api 'com.googlecode.json-simple:json-simple:1.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:21.0'
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
defaultTasks 'clean', 'test', 'jar', 'cleanJars', 'copyJar'
mainClassName = 'com.nowsecure.auto.circleci.Main'
tasks.withType(JavaExec) {
systemProperties System.properties
}
jar {
manifest {
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': mainClassName
)
}
}
task fatJar(type: Jar) {
manifest {
attributes 'Main-Class': mainClassName
}
baseName = 'all-in-one-jar'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task copyJar(type: Copy) {
from fileTree("${buildDir}/libs/").files
into file("dist")
include "*.jar"
}
task cleanJars(type: Delete) {
delete fileTree("dist").matching {
include "**/*.jar"
}
}