forked from mock-server/mockserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
185 lines (161 loc) · 5.17 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
allprojects {
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
group = 'org.mock-server'
version = "$mockServerVersion"
repositories {
flatDir { dirs "lib" }
mavenLocal()
mavenCentral()
}
compileJava {
// I only managed to get this working when I forked and passed 'javac' as an executable
if (project.hasProperty("showAllWarnings")) {
options.compilerArgs << "-Xlint:all"
} else {
options.compilerArgs << "-Xlint:all" << "-XDignore.symbol.file"
}
options.fork = true
options.forkOptions.executable = 'javac'
}
compileTestJava {
// I only managed to get this working when I forked and passed 'javac' as an executable
if (project.hasProperty("showAllWarnings")) {
options.compilerArgs << "-Xlint:all"
} else {
options.compilerArgs << "-XDignore.symbol.file"
}
options.fork = true
options.forkOptions.executable = 'javac'
}
test {
forkEvery 1
maxParallelForks 1
}
}
project(':mockserver-client') {
dependencies {
compile project(':mockserver-core')
}
}
project(':mockserver-war') {
dependencies {
compile project(':mockserver-core'), project(':mockserver-client')
testCompile project(':mockserver-integration-testing')
}
}
project(':mockserver-proxy-war') {
dependencies {
compile project(':mockserver-core'), project(':mockserver-client')
testCompile project(':mockserver-integration-testing')
}
}
project(':mockserver-integration-testing') {
dependencies {
compile project(':mockserver-core'), project(':mockserver-client')
}
}
project(':mockserver-jetty') {
dependencies {
compile project(':mockserver-core'), project(':mockserver-war'), project(':mockserver-proxy-war')
testCompile project(':mockserver-client'), project(':mockserver-integration-testing')
}
}
project(':mockserver-tomcat') {
dependencies {
compile project(':mockserver-core'), project(':mockserver-war'), project(':mockserver-proxy-war')
testCompile project(':mockserver-client'), project(':mockserver-integration-testing')
}
}
project(':mockserver-vertx') {
dependencies {
compile project(':mockserver-core')
testCompile project(':mockserver-client'), project(':mockserver-integration-testing')
}
}
project(':mockserver-examples') {
dependencies {
compile project(':mockserver-jetty'), project(':mockserver-client'), project(':mockserver-core')
}
}
task writeNewPom << {
pom {
project {
inceptionYear '2008'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}.writeTo("$buildDir/newpom.xml")
}
install {
group = 'build'
description = "Does a maven install of archives artifacts to local repository"
}
ext {
ext.poms = []
afterEvaluate {
poms*.whenConfigured { pom ->
pomModifications.each {
configure(pom, it)
}
}
}
pomModifications = []
modifyPom = { pomModifications << it }
}
tasks.withType(Upload) {
repositories.withType(org.gradle.api.artifacts.maven.MavenResolver) {
poms << it.pom
}
}
modifyPom {
project {
name rootProject.name
description 'mock-server - A simple server to support mocking responses from any server / service that uses HTTP. The expectations that configure how the MockServer will respond and to incoming requests can be setup using any language that can create JSON. In simple client is provided to make this easy in Java.'
groupId rootProject.group
inceptionYear '2013'
packaging 'jar'
url 'http://org.mock-server.com'
developers {
developer {
id 'jamesdbloom'
name 'James D Bloom'
email 'jamesdbloom@gmail.com'
url 'http://blog.jamesdbloom.com'
}
}
scm {
connection 'scm:git:https://github.com/jamesdbloom/mockservice.git'
developerConnection 'scm:git:git@github.com:jamesdbloom/mockservice.git'
url 'https://github.com/jamesdbloom/mockservice.git'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
properties {
setProperty('project.build.sourceEncoding', 'UTF8')
}
}
}
def loadProperties(String sourceFileName) {
def config = new Properties()
def propFile = new File(sourceFileName)
if (propFile.canRead()) {
config.load(new FileInputStream(propFile))
for (Map.Entry property in config) {
project.ext[property.key] = property.value;
}
}
}
loadProperties("$rootDir/gradle.properties" as String)