-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.gradle
69 lines (58 loc) · 1.16 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
69
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'application'
version = '3.0.0'
group = 'org.hjson.cli'
description = """Hjson CLI"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceSets {
main {
java {
srcDir 'src'
}
}
}
repositories {
flatDir {
dirs '../build/libs'
}
mavenCentral()
}
dependencies {
compile 'org.hjson:hjson:'+version
compile 'commons-cli:commons-cli:1.3.1'
}
mainClassName = 'org.hjson.cli.Main'
jar {
baseName = 'Hjson'
manifest {
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': 'org.hjson.cli.Main',
'Hjson-Version': version,
)
}
}
task distjar(type: Jar) {
manifest=jar.manifest
archiveName="Hjson-cli.jar"
//baseName="Hjson-dist"
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task dist(type: Copy, dependsOn: distjar) {
from('build/libs') {
include '*.jar'
}
from('bin') {
include '*'
}
into 'build/target'
}
task zip(type:Zip, dependsOn: dist) {
from ('build/target')
include '*'
archiveName 'hjson.zip'
destinationDir file('build/zip')
}