forked from MorphiaOrg/morphia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
215 lines (174 loc) · 5.5 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
import java.util.concurrent.TimeUnit
def configDir = new File(rootDir, 'config')
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
classpath 'me.trnl:clirr-gradle-plugin:0.4'
classpath 'com.antwerkz.github:github-release-gradle-plugin:1.0.0-RC3'
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.3'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.8'
}
allprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
configurations {
provided
provided.extendsFrom(compile)
}
task listDependencies << {
configurations.compile.each { File file -> println file }
}
}
def slf4jVersion = '1.7.5'
configure(subprojects) {
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
group = 'org.mongodb.morphia'
version = '0.106-SNAPSHOT'
sourceCompatibility = '1.5'
targetCompatibility = '1.5'
configurations {
provided
provided.extendsFrom(compile)
}
project.archivesBaseName = "morphia-${project.name}"
repositories {
mavenCentral()
mavenLocal()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
testCompile 'junit:junit:4.11'
}
sourceSets.main.compileClasspath += configurations.provided
sourceSets.test.compileClasspath += configurations.provided
sourceSets.test.runtimeClasspath += configurations.provided
if (properties['xlint']) {
tasks.withType(Compile) {
options.compilerArgs << "-Xlint:unchecked"
}
}
project.ext.buildingWith = { n -> project.hasProperty(n) && project.property(n).toBoolean()
}
/* Code quality */
checkstyle {
configFile = new File("$configDir/checkstyle.xml")
}
findbugs {
excludeFilter = new File("$configDir/findbugs-exclude.xml")
}
tasks.withType(Test) {
if (System.getenv()['RS_ENABLED'] == "true") {
systemProperty 'MONGO_URI', 'mongodb://localhost:27017,localhost:27018,localhost:27019'
}
}
tasks.withType(FindBugs) {
reports {
xml.enabled = project.buildingWith('xmlReports.enabled')
html.enabled = !project.buildingWith('xmlReports.enabled')
}
}
javadoc {
options.author = true
options.version = true
options.links 'http://docs.oracle.com/javase/7/docs/api/'
}
test {
// set heap size for the test JVM(s)
minHeapSize = "256m"
maxHeapSize = "512m"
// set JVM arguments for the test JVM(s)
jvmArgs '-XX:MaxPermSize=256m'
}
}
project(':morphia') {
archivesBaseName = 'morphia'
dependencies {
if (project.hasProperty('3.x')) {
compile group: "org.mongodb", name: "mongo-java-driver", version: "3.0.0-SNAPSHOT", changing: true
println "Building with the 3.x java driver"
} else if (project.hasProperty('2.x')) {
compile group: "org.mongodb", name: "mongo-java-driver", version: "2.12.0-SNAPSHOT", changing: true
println "Building with the 2.x java driver"
} else {
compile 'org.mongodb:mongo-java-driver:[2.10.1,2.12)'
}
provided 'cglib:cglib-nodep:[2.1_3,3.0)'
provided 'com.thoughtworks.proxytoys:proxytoys:1.0'
provided 'com.google.code.findbugs:findbugs:2.0.2'
}
}
project(':logging-slf4j') {
dependencies {
compile project(':morphia')
compile "org.slf4j:slf4j-api:$slf4jVersion"
testCompile "org.slf4j:slf4j-simple:$slf4jVersion"
}
}
project(':validation') {
dependencies {
compile 'javax.validation:validation-api:1.0.0.GA'
compile project(':morphia')
compile project(':logging-slf4j')
testCompile 'org.hibernate:hibernate-validator:4.1.0.Final'
testCompile "org.slf4j:slf4j-jdk14:${slf4jVersion}"
if(System.getProperty('java.version').startsWith("1.5")) {
println "Including extra dependencies for the older JVM"
testCompile 'com.sun.xml.bind:jaxb-impl:2.2.4-1'
testCompile 'javax.xml.bind:jaxb-api:2.2.4'
testCompile 'javax.xml.soap:saaj-api:1.3.3'
}
}
}
project(':entityscanner-plug') {
dependencies {
compile('org.reflections:reflections:0.9.8') {
'servlet-api:javax.servlet'
'com.google.code.gson:gson'
'logback-classic:ch.qos.logback'
'xml-apis:xml-apis'
}
compile 'com.google.collections:google-collections:1.0'
compile('org.scannotation:scannotation:1.0.3') {
'javassist:javassist'
}
compile project(':morphia')
testCompile "org.slf4j:slf4j-simple:${slf4jVersion}"
}
}
project(':guice-plug') {
dependencies {
compile 'com.google.inject:guice:3.0'
compile project(':morphia')
}
}
project(':jrebel-plug') {}
project(':no-proxy-deps-tests') {
sourceSets {
main {
output.classesDir '../morphia/build/classes/test'
}
}
dependencies {
compile project(':morphia')
}
}
project(':gwt') {
sourceSets {
main {
java { srcDirs = [] }
}
}
}
apply from: 'gradle/ide-settings.gradle'
apply from: 'gradle/maven-deployment.gradle'
apply from: 'gradle/osgi-compatibility.gradle'
apply from: 'gradle/release-process.gradle'