-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
100 lines (88 loc) · 2.25 KB
/
build.gradle
File metadata and controls
100 lines (88 loc) · 2.25 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
apply plugin: 'java'
version = '0.1.0'
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
sourceSets {
main {
java {
srcDir 'src/main'
}
resources {
srcDir 'src/main'
}
}
test {
java {
srcDir 'src/example'
}
resources {
srcDir 'src/example'
}
}
}
repositories {
mavenCentral()
}
jar {
from(sourceSets.main.output)
destinationDir = file("${projectDir}/dist/main")
baseName = 'ModularCommands'
version = "${version}"
manifest {
attributes("Implementation-Title": "ModularCommands",
"Implementation-Version": version)
}
}
task exampleJar(type: Jar) {
from(sourceSets.test.output)
destinationDir = file("${projectDir}/dist/example")
baseName = 'ModularCommandsExample'
version = "${version}"
manifest {
attributes("Implementation-Title": "ModularCommandsExample",
"Implementation-Version": version,
"Main-Class": "modcmd.example.CommandTerminal"
)
}
}
task dist {
description "Generate the dist. into the dist folder."
delete "${projectDir}/dist/main"
copy {
from "${buildDir}/libs"
into "${projectDir}/dist/main"
}
}
task zipDist(type: Zip, dependsOn: dist) {
from "${projectDir}/dist/main"
from "${projectDir}/Readme.md"
destinationDir = file("${projectDir}/dist")
version = "${version}"
appendix = "Main"
doLast {
println "Created ${zipDist.archiveName}"
}
}
task distExample() {
description "Generate the example dist. into the dist folder."
delete "${projectDir}/dist/example"
copy {
from "${projectDir}/build/classes/test/Output"
into "${projectDir}/dist/example"
}
}
task zipExampleDist(type: Zip, dependsOn: distExample) {
from "${projectDir}/dist/example"
from "${projectDir}/Readme.md"
destinationDir = file("${projectDir}/dist")
version = "${version}"
appendix = "Example"
doLast{
println "Created ${zipTest.archiveName}"
}
}
task run(type:JavaExec) {
main = "modcmd.example.CommandTerminal"
classpath = sourceSets.test.runtimeClasspath
standardInput = System.in
}