-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
104 lines (85 loc) · 2.8 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
plugins {
id 'edu.sc.seis.launch4j' version '1.6.2'
}
repositories {
mavenLocal()
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'idea'
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext.configFile = file "build.properties"
configFile.withReader {
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
//compileJava.options.bootClasspath = config.jdk + '/jre/lib/rt.jar'
group config.package
version config.version
jar {
manifest {
attributes 'Main-Class': config.package + '.' + config.application,
'Built-By': System.getProperty('user.name'),
'Created-By': "${System.getProperty('java.vm.version')} + (${System.getProperty('java.vm.vendor')})",
'Implementation-Title': config.title,
'Implementation-Version': version,
'Provider': 'Gradle'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}
tasks.withType(JavaCompile) { task ->
task.options.encoding = 'UTF-8'
}
task fatJar(type: Jar) {
manifest.from jar.manifest
classifier = 'all'
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
with jar
}
task copyToLib(type: Copy) {
into "$buildDir/libs/lib"
from configurations.runtime
}
tasks.build.dependsOn fatJar
copyL4jLib.dependsOn fatJar
//fatJarPrepareFiles.dependsOn jar
launch4j {
mainClassName = config.package + '.' + config.application
icon = "../../src/main/resources/public/favicon.ico"
copyConfigurable = project.tasks.fatJar.outputs.files
jar = "lib/${project.tasks.fatJar.archiveName}"
headerType = "console"
version = version
}
dependencies {
compile 'org.javassist:javassist:3.20.0-GA'
compile 'org.reflections:reflections:0.9.10'
compile 'org.slf4j:slf4j-log4j12:1.7.13'
compile 'log4j:apache-log4j-extras:1.0'
compile 'com.jcraft:jzlib:1.1.3'
compile 'javax.mail:javax.mail-api:1.5.5'
compile 'com.sun.mail:javax.mail:1.5.5'
compile 'io.netty:netty-all:4.1.5.Final'
compile 'com.mitchellbosecke:pebble:2.0.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.2'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.7.2'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.7.2'
compile 'org.hibernate:hibernate-core:5.1.0.Final'
compile 'com.mchange:c3p0:0.9.2.1'
compile 'org.hibernate:hibernate-c3p0:5.1.0.Final'
compile 'org.hibernate:hibernate-ehcache:5.1.0.Final'
compile 'mysql:mysql-connector-java:5.1.38'
compile 'javax.transaction:jta:1.1'
compile 'org.flywaydb:flyway-core:4.0'
}