-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
84 lines (66 loc) · 1.98 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
apply plugin: 'eclipse'
apply plugin: 'application' // 生成bin lib的distribution : gradle distTar
def home = System.getenv("HOME")
allprojects {
apply plugin: 'java'
apply plugin: 'maven' // 发布artifacts
apply plugin: 'groovy'
version = '1.0'
group = 'com.epiphyllum'
description = 'dropwizard all-in-one template'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
jar {
manifest {
attributes("Implementation-Title": "Gradle")
}
}
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compile(
'org.codehaus.groovy:groovy-all:2.4.1',
'org.glassfish.jersey.ext:jersey-proxy-client:2.22.1',
'com.epiphyllum:h2tool:1.0'
)
testCompile(
'junit:junit:4.12', // junit
'org.spockframework:spock-core:1.0-groovy-2.4', // spock
'org.assertj:assertj-core:3.2.0', // assertj
'org.hamcrest:hamcrest-core:1.3', // only necessary if Hamcrest matchers are used
'io.dropwizard:dropwizard-testing:0.9.1',
)
testRuntime(
'cglib:cglib-nodep:3.2.0', // allows mocking of classes (in addition to interfaces)
'org.objenesis:objenesis:2.2', // allows mocking of classes without default constructor (together with CGLIB)
)
}
}
// 所有子项目
subprojects {
// maven plugin
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://$home/.m2/repository")
}
}
}
}
project(':server') {
}
project(':client') {
}
// 默认的restdriver
mainClassName = 'com.epiphyllum.nio.example'
applicationDefaultJvmArgs = []
applicationName = 'nio'
distZip {
archiveName = project.name + '.zip'
}
distTar {
archiveName = project.name + '.tar'
}