forked from MorphiaOrg/morphia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
132 lines (104 loc) · 3.3 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
ext.configDir = new File(rootDir, 'config')
ext.slf4jVersion = '1.7.5'
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
classpath 'org.kordamp.gradle:clirr-gradle-plugin:0.2.1'
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.2'
}
allprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
apply plugin: 'jacoco'
apply plugin: 'org.kordamp.gradle.clirr'
apply plugin: 'optional-base'
group = 'org.mongodb.morphia'
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
mavenLocal()
}
dependencies {
testCompile 'junit:junit:4.12'
}
project.archivesBaseName = "morphia-${project.name}"
task listDependencies << {
configurations.compile.each { File file -> println file }
}
task testCoverage(dependsOn: check)
checkstyle {
configFile = new File("$configDir/checkstyle.xml")
}
findbugs {
excludeFilter = new File("$configDir/findbugs-exclude.xml")
toolVersion = '3.0.0'
sourceSets = [sourceSets.main]
}
tasks.withType(FindBugs) {
reports {
xml.enabled = project.buildingWith('xmlReports.enabled')
html.enabled = !project.buildingWith('xmlReports.enabled')
}
}
tasks.withType(AbstractCompile) {
options.encoding = 'ISO-8859-1'
options.fork = true
options.debug = true
options.compilerArgs = ['-Xlint:unchecked', '-Xlint:deprecation', '-Xlint:-options']
}
tasks.withType(Test) {
if (System.getenv()['RS_ENABLED'] == "true") {
systemProperty 'MONGO_URI', 'mongodb://localhost:27017,localhost:27018,localhost:27019'
}
useJUnit {
}
jacoco { enabled = false }
beforeTest { descr ->
logger.info("[Test ${descr.className} > ${descr.name}]")
}
}
javadoc {
options.encoding = "UTF-8"
options.author = true
options.version = true
options.links 'http://docs.oracle.com/javase/6/docs/api/'
options.links 'http://api.mongodb.org/java/3.0/'
}
test {
// set heap size for the test JVM(s)
minHeapSize = "256m"
maxHeapSize = "512m"
}
task quickCheck(dependsOn: ['checkstyleMain', 'checkstyleTest']) {}
}
task clirrRootReport(type: org.kordamp.gradle.clirr.ClirrReportTask) << {
dependsOn = subprojects.tasks.clirr
reports = files((subprojects.findAll { it.clirr.enabled == true }).tasks.clirr.xmlReport)
}
def buildingWith(n) {
project.hasProperty(n)
}
apply from: 'gradle/osgi-compatibility.gradle'
apply from: 'gradle/release-process.gradle'
apply from: 'gradle/docs.gradle'