-
Notifications
You must be signed in to change notification settings - Fork 69
/
build.gradle
135 lines (107 loc) · 3.96 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
group 'nlpcn.org'
version '5.0.0'
apply plugin: 'java'
apply plugin: 'idea'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
maven {
url "http://maven.aliyun.com/nexus/content/groups/public/"
}
mavenCentral()
}
configurations {
all*.exclude group: 'log4j', module: 'log4j'
}
dependencies {
compile 'org.nutz:nutz:1.r.65'
compile 'com.alibaba:fastjson:1.2.28'
compile 'com.h2database:h2:1.3.176'
compile 'com.zaxxer:HikariCP:3.1.0'
compile 'org.quartz-scheduler:quartz:2.2.1'
compile 'javax.mail:mail:1.4.1'
compile 'com.google.guava:guava:18.0'
compile 'com.github.javaparser:javaparser-core:2.4.0'
compile 'org.apache.zookeeper:zookeeper:3.4.11'
compile 'org.apache.curator:curator-framework:2.12.0'
compile 'org.apache.curator:curator-recipes:2.12.0'
compile 'commons-io:commons-io:2.6'
compile 'commons-codec:commons-codec:1.11'
compile 'org.eclipse.jgit:org.eclipse.jgit:4.10.0.201712302008-r'
//new version use log
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.10.0'
compile 'org.apache.logging.log4j:log4j-jcl:2.10.0'
compile 'org.apache.logging.log4j:log4j-api:2.10.0'
compile 'org.apache.logging.log4j:log4j-web:2.10.0'
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'org.apache.logging.log4j:log4j-1.2-api:2.10.0'
compile 'org.apache.logging.log4j:log4j-core:2.10.0'
//javaee support
compile 'javax.servlet:javax.servlet-api:3.1.0'
compile 'javax.inject:javax.inject:1'
compile 'javax:javaee-api:7.0'
compile 'org.eclipse.jetty:jetty-servlet:9.4.8.v20171121'
// web server
compile 'org.eclipse.jetty:jetty-webapp:9.4.8.v20171121'
compile 'org.eclipse.jetty:jetty-continuation:9.4.8.v20171121'
compile 'org.eclipse.jetty.websocket:websocket-server:9.4.8.v20171121'
compile 'org.eclipse.jetty.websocket:javax-websocket-server-impl:9.4.8.v20171121'
testCompile 'junit:junit:4.12'
jar{
def configFile = file('src/main/resources/jcoder.properties') ;
configFile.write("version="+version+"_"+new Date().format('yyyyMMddHHmm'));
manifest {
attributes 'Implementation-Title': 'Jcoder Webserver', 'Implementation-Version': version, 'Main-Class':'Bootstrap'
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }{
exclude "META-INF/*.SF"
exclude "META-INF/LICENSE"
exclude "aboult.html"
}
from('src/main/webapp') {
into ('webapp')
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
}
// intellij configuration
idea {
module {
inheritOutputDirs = false
outputDir = file("$buildDir/classes/main")
testOutputDir = file("$buildDir/classes/test")
iml {
// fix so that Gradle idea plugin properly generates support for resource folders
// see also https://issues.gradle.org/browse/GRADLE-2975
withXml {
it.asNode().component.content.sourceFolder.findAll {
it.@url == 'file://$MODULE_DIR$/src/main/resources'
}.each {
it.attributes().remove('isTestSource')
it.attributes().put('type', 'java-resource')
}
it.asNode().component.content.sourceFolder.findAll {
it.@url == 'file://$MODULE_DIR$/src/test/resources'
}.each {
it.attributes().remove('isTestSource')
it.attributes().put('type', 'java-test-resource')
}
}
}
}
}
// task for debug
task debug(type: JavaExec) {
if (project.hasProperty('jvmArgs')) {
jvmArgs(project.jvmArgs.split('\\s+'))
}
classpath = sourceSets.main.runtimeClasspath
classpath += files('src/test/resources')
main = "Bootstrap"
if (project.hasProperty('appArgs')) {
args(project.appArgs.split('\\s+'))
}
}