-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
114 lines (94 loc) · 2.59 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
110
111
112
113
114
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
project.version = "1.0.15-SNAPSHOT"
project.group = 'com.codingchili.flashcards'
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.2.0'
compile 'org.web3j:core:2.3.1@jar'
testCompile 'io.vertx:vertx-unit:3.7.1'
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': 'flashcards',
'Implementation-Version': version,
'Main-Class': 'com.codingchili.flashcards.Service'
}
exclude 'META-INF/*.RSA', 'META-INF/*.DSA', 'META-INF/*.SF'
}
task archiveZip(type: Zip, dependsOn: [subprojects.jar, polymer]) {
baseName = 'flashcards'
from('script') {
fileMode = 0755
include '**/run.sh'
include '**/run.bat'
expand(jar: jar.outputs.files[0].name, app: project.name, version: project.version)
}
from (jar.outputs.files) {
into('/')
}
/*from('data') {
into('/data/')
}*/
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"))
}