-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
186 lines (165 loc) · 4.85 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
import java.util.regex.Matcher
plugins {
id 'java'
id 'io.quarkus'
id 'maven'
id 'maven-publish'
id 'signing'
id 'org.kordamp.gradle.jandex'
id 'net.researchgate.release'
}
group 'io.github.trikorasolns'
//group 'com.trikorasolutions.keycloak'
defaultTasks 'quarkusBuild', 'check'
repositories {
mavenCentral()
mavenLocal()
}
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}"
}
// ###########
// # Release #
// ###########
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 = 'main'
pushToRemote = 'origin'
pushToBranchPrefix = ''
commitVersionFileOnly = false
signTag = false
}
}
// ###########
// # Publish #
// ###########
//afterReleaseBuild.dependsOn uploadArchives
publishing {
publications {
mavenJava(MavenPublication) {
artifactId "${project.name}"
groupId "${group}"
version "${version}"
from components.java
pom {
name = 'Keycloak Quarkus Reactive REST Client'
description = 'Reactive Keycloak REST client to be used on Quarkus.'
url = 'https://github.com/trikorasolns/keycloak-quarkus-client/'
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 = 'Antonio Costa'
}
// developer {
// id 'SirSkizo'
// name 'Angel Casanova'
// }
}
issueManagement {
system = 'Github'
url = 'https://github.com/trikorasolns/keycloak-quarkus-client/issues'
}
scm {
connection = 'scm:git:https://github.com/trikorasolns/keycloak-quarkus-client/.git'
developerConnection = 'scm:git:[email protected]:trikorasolns/keycloak-quarkus-client/.git'
url = 'https://github.com/trikorasolns/keycloak-quarkus-client/'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
authentication {
basic(BasicAuthentication)
digest(DigestAuthentication)
}
credentials(PasswordCredentials)
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
// ###########
// # PROJECT #
// ###########
dependencies {
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation 'io.quarkus:quarkus-arc'
// KeyClock
implementation 'io.quarkus:quarkus-keycloak-authorization'
implementation 'io.rest-assured:rest-assured'
// Rest
implementation 'io.quarkus:quarkus-resteasy-reactive'
implementation 'io.quarkus:quarkus-resteasy-reactive-jackson'
implementation 'io.quarkus:quarkus-rest-client-reactive'
implementation 'io.quarkus:quarkus-rest-client-reactive-jackson'
// Console
implementation 'io.quarkus:quarkus-smallrye-health'
implementation 'io.quarkus:quarkus-smallrye-openapi'
// Test
testImplementation 'io.quarkus:quarkus-junit5'
testImplementation 'io.rest-assured:rest-assured'
testImplementation 'io.quarkus:quarkus-test-vertx'
testImplementation "org.assertj:assertj-core:${assertjCoreVersion}"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withJavadocJar()
withSourcesJar()
}
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-parameters'
}
compileTestJava {
options.encoding = 'UTF-8'
}