forked from polypheny/Polypheny-DB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
207 lines (176 loc) · 6.22 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
import org.jetbrains.gradle.ext.Gradle
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath group: "io.freefair.gradle", name: "lombok-plugin", version: lombok_version
classpath group: "com.adarshr", name: "gradle-test-logger-plugin", version: gradle_test_logger_version
classpath group: "org.reflections", name: "reflections", version: reflections_version
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.5.31"
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.1"
}
allprojects {
version = versionMajor + "." + versionMinor + "." + versionMicro
isRelease = isRelease.toBoolean()
if (!isRelease) {
version = version + "-SNAPSHOT"
}
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url "https://clojars.org/repo/"
}
}
}
apply plugin: "java-library"
apply plugin: "io.freefair.lombok"
apply plugin: "com.adarshr.test-logger"
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
javadoc.options.encoding = "UTF-8"
sourceCompatibility = 1.11
targetCompatibility = 1.11
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://clojars.org/repo/"
}
maven {
// DBIS Nexus
url "https://dbis-nexus.dmi.unibas.ch/repository/maven2/"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
}
tasks.withType(Javadoc) {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption("html5", true)
}
// Suppress most of the warnings
options.addStringOption("Xdoclint:none", "-quiet")
// Include private fields in JavaDoc
options.memberLevel = JavadocMemberLevel.PRIVATE
}
task dockerTests(type: Test) {
description = 'Runs docker tests.'
group = 'verification'
useJUnit {
includeCategories 'org.polypheny.db.docker.DockerManagerTest'
}
shouldRunAfter(tasks.named('test'))
}
dockerTests.dependsOn(testClasses)
String storeName = System.getProperty("store.default") != null ? System.getProperty("store.default") : 'hsqldb'
task integrationTests(type: Test) {
description = 'Runs integration tests.'
group = 'verification'
systemProperty 'store.default', storeName
useJUnit {
includeCategories 'org.polypheny.db.AdapterTestSuite'
excludeCategories 'org.polypheny.db.excluded.' + storeName.capitalize() + "Excluded"
}
shouldRunAfter(tasks.named('test'))
}
integrationTests.dependsOn(testClasses)
testlogger {
theme 'standard'
showExceptions true
showStackTraces true
showFullStackTraces false
showCauses true
slowThreshold 2000
showSummary true
showSimpleNames false
showPassed false
showSkipped false
showFailed true
showStandardStreams true
showPassedStandardStreams false
showSkippedStandardStreams false
showFailedStandardStreams true
logLevel 'lifecycle'
}
dependencies {
////// PF4J
compileOnly(group: 'org.pf4j', name: 'pf4j', version: pf4jVersion) {
exclude group: "org.slf4j"
}
annotationProcessor group: 'org.pf4j', name: 'pf4j', version: pf4jVersion
testCompileOnly(group: 'org.pf4j', name: 'pf4j', version: pf4jVersion) {
exclude group: "org.slf4j"
}
}
idea {
module {
downloadJavadoc = true
downloadSources = true
inheritOutputDirs = false
outputDir = file("${project.buildDir}/classes")
testOutputDir = file("${project.buildDir}/test-classes")
generatedSourceDirs += file("${project.buildDir}/generated-sources")
generatedSourceDirs += file("${project.buildDir}/generated-test-sources")
}
}
}
// plugin location
ext.pluginsDir = rootProject.buildDir.path + '/plugins'
build {
dependsOn(":plugins:build")
}
idea {
project {
settings {
runConfigurations {
"Polypheny-DB"(Gradle) {
taskNames = ["assemblePlugins", "run"]
}
"Polypheny-DB (reset)"(Gradle) {
taskNames = ["assemblePlugins", ":dbms:runReset"]
}
}
copyright {
useDefault = "ApacheLicense"
profiles {
ApacheLicense {
notice = 'Copyright 2019-$today.year The Polypheny Project\n' +
'\n' +
'Licensed under the Apache License, Version 2.0 (the \"License\");\n' +
'you may not use this file except in compliance with the License.\n' +
'You may obtain a copy of the License at\n' +
'\n' +
'http://www.apache.org/licenses/LICENSE-2.0\n' +
'\n' +
'Unless required by applicable law or agreed to in writing, software\n' +
'distributed under the License is distributed on an \"AS IS\" BASIS,\n' +
'WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n' +
'See the License for the specific language governing permissions and\n' +
'limitations under the License.'
keyword = "Copyright"
}
}
}
}
}
}