-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
237 lines (209 loc) · 6.42 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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
import java.util.regex.Matcher
plugins {
id 'java'
id 'io.quarkus'
id 'org.kordamp.gradle.jandex'
id 'net.researchgate.release'
id 'maven-publish'
id 'checkstyle'
id 'pmd'
id 'idea'
}
group 'com.trikorasolutions.quarkus.tpae.rest'
description 'Trikora Solutions :: Middleware :: TPAE Rest'
defaultTasks 'quarkusBuild', 'check'
// Tasks
def getTimestamp() {
return new Date().format('yyyyMMddHHmmss')
}
configure(rootProject) {
file("$rootDir/version.properties").withReader {
Properties props = new Properties()
props.load(it)
project.ext.propVer = props
}
version = ext.propVer.get('version')
println "version: ${version}"
}
// Plugins
release {
failOnCommitNeeded = true
failOnPublishNeeded = true
failOnSnapshotDependencies = true
failOnUnversionedFiles = true
failOnUpdateNeeded = true
revertOnFail = true
preCommitText = ''
preTagCommitMessage = '[Gradle Release Plugin] - pre tag commit: '
tagCommitMessage = '[Gradle Release Plugin] - creating tag: '
newVersionCommitMessage = '[Gradle Release Plugin] - new version commit: '
tagTemplate = '${version}'
versionPropertyFile = 'version.properties'
versionProperties = ['version']
snapshotSuffix = '-SNAPSHOT'
buildTasks = ['quarkusBuild']
ignoredSnapshotDependencies = []
versionPatterns = [
/(\d+)([^\d]*$)/: { Matcher m, Project p -> m.replaceAll("${(m[0][1] as int) + 1}${m[0][2]}") }
]
pushReleaseVersionBranch = false
scmAdapters = [
net.researchgate.release.GitAdapter
]
git {
requireBranch = 'master'
pushToRemote = 'origin'
pushToBranchPrefix = ''
commitVersionFileOnly = false
signTag = false
}
}
publishing {
publications {
maven(MavenPublication) {
artifactId "${project.name}"
groupId "${group}"
version "${version}"
from components.java
pom {
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
organization {
name = 'Trikora Solutions'
url = 'https://github.com/trikorasolns'
}
developers {
developer {
id = 'jacobdotcosta'
name = 'A.C.'
// email = 'github@larsgrefer.de'
// timezone = 'Europe/Berlin'
}
}
issueManagement {
system = 'Github'
url = 'https://github.com/trikorasolns/quarkus-tpae-maxrest/issues'
}
scm {
connection = 'scm:git:https://github.com/trikorasolns/quarkus-tpae-maxrest.git'
developerConnection = 'scm:git:git@github.com:trikorasolns/quarkus-tpae-maxrest.git'
url = 'https://github.com/trikorasolns/quarkus-tpae-maxrest'
}
}
}
}
repositories {
maven {
name = 'GitHub'
// change URLs to point to your repos, e.g. http://my.org/repo
def releasesRepoUrl = "https://maven.pkg.github.com/trikorasolns/quarkus-tpae-maxrest"
// def snapshotsRepoUrl = "$buildDir/repos/snapshots"
// url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
url = releasesRepoUrl
authentication {
basic(BasicAuthentication)
digest(DigestAuthentication)
}
credentials(PasswordCredentials)
}
}
}
// ### PROJECTS ####
repositories {
mavenLocal()
mavenCentral()
}
// ### PLUGINS ####
//apply plugin: JavaPlugin
//apply plugin: 'maven'
//apply plugin: 'java'
//apply plugin: 'maven-publish'
//apply plugin: 'idea'
//apply plugin: 'org.kordamp.gradle.jandex'
//apply plugin: 'pmd'
compileJava {
// options.fork = true
options.encoding = 'UTF-8'
options.compilerArgs << '-parameters'
}
compileTestJava {
// options.fork = true
options.encoding = 'UTF-8'
options.compilerArgs << '-parameters'
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
test {
// exclude '**/**IT'
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager"
}
//sourceSets {
// main {
// java {
// srcDirs = ['src/main/java']
// }
// resources {
// srcDir 'src/main/resources'
// }
// }
//
// test {
// java {
// srcDirs = ['src/test/java']
// }
// resources {
// srcDir 'src/test/resources'
// }
// }
//}
// Resources filter.
//processResources {
// Properties gradleProps = new Properties()
// gradleProps.load(new FileInputStream(rootDir.toString() + '/gradle.properties'))
// filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: gradleProps)
// filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [
// artifactId: project.name
// ])
//}
//test {
// systemProperties(System.getProperties())
//}
dependencies {
// Quarkus
implementation enforcedPlatform([group: quarkusPlatformGroupId, name: quarkusPlatformArtifactId, version: quarkusPlatformVersion])
implementation 'io.quarkus:quarkus-arc'
// Rest
// implementation([group: 'io.quarkus', name: 'quarkus-resteasy-mutiny'])
// implementation([group: 'io.quarkus', name: 'quarkus-rest-client'])
// implementation([group: 'io.quarkus', name: 'quarkus-rest-client-jackson'])
implementation 'io.rest-assured:rest-assured'
// Reactive
implementation 'io.quarkus:quarkus-resteasy-reactive'
implementation 'io.quarkus:quarkus-resteasy-reactive-jackson'
implementation([group: 'io.quarkus', name: 'quarkus-rest-client-reactive'])
implementation([group: 'io.quarkus', name: 'quarkus-rest-client-reactive-jackson'])
// implementation([group: 'io.quarkus', name: 'resteasy-reactive-jackson'])
// implementation([group: 'io.quarkus', name: 'rest-client-reactive-jackson'])
// implementation([group: 'io.smallrye.reactive', name: 'smallrye-mutiny-vertx-web-client'])
// Test
testImplementation 'io.quarkus:quarkus-junit5'
// testImplementation 'io.quarkus:quarkus-junit5-mockito'
testImplementation 'io.rest-assured:rest-assured'
testImplementation("com.github.tomakehurst:wiremock-jre8:$wiremockVersion")
// testImplementation([group: 'org.testcontainers', name: 'testcontainers', version: testContainersVersion])
testImplementation 'io.quarkus:quarkus-test-vertx'
testImplementation "org.assertj:assertj-core:${assertjCoreVersion}"
}
// release
afterReleaseBuild.dependsOn publish
tasks.withType(GenerateModuleMetadata).configureEach {
// The value 'enforced-platform' is provided in the validation
// error message you got
suppressedValidationErrors.add('enforced-platform')
}