-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
109 lines (90 loc) · 2.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
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
101
102
103
104
105
106
107
108
109
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'idea'
project.version = "1.1.1"
project.group = 'com.github.codingchili.zapperfly-asm'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
maven { url 'https://jitpack.io' }
mavenCentral()
}
dependencies {
compile 'com.github.codingchili.chili-core:core:1.0.38RC1'
testCompile 'io.vertx:vertx-unit:3.5.3'
testCompile 'junit:junit:4.12'
}
test {
testLogging {
exceptionFormat "full"
}
reports.html.enabled = false
}
task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
}
ext {
polymerBin = Os.isFamily(Os.FAMILY_WINDOWS) ? 'polymer.cmd' : 'polymer'
bowerBin = Os.isFamily(Os.FAMILY_WINDOWS) ? 'bower.cmd' : 'bower'
}
task polymer {
doLast {
exec {
workingDir "./polymer"
commandLine = [bowerBin, "install"]
}
exec {
workingDir "./polymer"
commandLine = [polymerBin, "build"]
}
}
}
jar {
zip64 true
from {
(configurations.runtime).collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes 'Implementation-Title': 'zapperfly',
'Implementation-Version': version,
'Main-Class': 'com.codingchili.zapperflyasm.Service'
}
exclude 'META-INF/*.RSA', 'META-INF/*.DSA', 'META-INF/*.SF'
}
task archiveZip(type: Zip, dependsOn: [subprojects.jar, polymer]) {
baseName = 'zapperfly'
from('script') {
fileMode = 0755
include '**/zapperfly.sh'
include '**/zapperfly.bat'
expand(jar: jar.outputs.files[0].name, app: project.name, version: project.version)
}
from (jar.outputs.files) {
into('/')
}
from('./') {
include 'application.json'
into('/')
}
from('polymer/build/default/') {
into('/polymer')
}
into('/')
}
task alljavadoc(type: Javadoc) {
source subprojects.collect { it.sourceSets.main.allJava }
classpath = files(subprojects.collect { it.sourceSets.main.compileClasspath })
destinationDir = file("${buildDir}/docs/javadoc")
}
task archiveJavadoc(type: Zip, dependsOn: alljavadoc) {
baseName = 'javadocs'
from fileTree(file("${buildDir}/docs/javadoc"))
}