-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
68 lines (55 loc) · 1.41 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
61
62
63
64
65
66
67
68
plugins {
id 'com.gradle.build-scan' version '1.11'
}
group 'io.codepace'
version '1.0'
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'distribution'
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
}
mainClassName="io.codepace.cozy.Main"
//executableDir = "."
jar {
manifest{
attributes 'Main-Class': 'io.codepace.cozy.Main'
}
}
task fatJar(type: Jar){
manifest {
attributes 'Implementation-Title' : 'Cozy 0.2.0 Daemon',
'Implementation-Version' : version,
'Main-Class' : 'io.codepace.cozy.Main'
}
baseName = project.name;
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task buildAll{
dependsOn fatJar
dependsOn javadocJar
dependsOn sourcesJar
}
artifacts {
archives sourcesJar
archives javadocJar
}
targetCompatibility = 1.8
repositories {
jcenter()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'commons-codec', name: 'commons-codec', version: '1.11'
compile group: 'net.sourceforge.argparse4j', name: 'argparse4j', version: '0.8.1'
}