-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathbuild.gradle
More file actions
232 lines (197 loc) · 7.45 KB
/
build.gradle
File metadata and controls
232 lines (197 loc) · 7.45 KB
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
plugins {
id 'io.kestra.gradle.spotless-conventions' version '1.1.0'
id "com.vanniktech.maven.publish" version "0.36.0"
id "io.kestra.gradle.inject-bom-versions" version "1.1.0"
id 'java-library'
id "idea"
id 'jacoco'
id "com.adarshr.test-logger" version "4.0.0"
id "com.gradleup.shadow" version "9.4.1"
id 'signing'
id "com.github.ben-manes.versions" version "0.54.0"
id 'net.researchgate.release' version '3.1.0'
}
def isBuildSnapshot = version.toString().endsWith("-SNAPSHOT")
repositories {
mavenLocal()
mavenCentral()
if (isBuildSnapshot) {
maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
}
}
final targetJavaVersion = JavaVersion.VERSION_21
java {
sourceCompatibility = targetJavaVersion
targetCompatibility = targetJavaVersion
}
group "io.kestra.plugin"
description 'Utilize Kubernetes resources for scalable Kestra data orchestration.'
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
}
dependencies {
// Platform
annotationProcessor enforcedPlatform("io.kestra:platform:$kestraVersion")
implementation enforcedPlatform("io.kestra:platform:$kestraVersion")
// Lombok
annotationProcessor "org.projectlombok:lombok"
compileOnly "org.projectlombok:lombok"
// Micronaut
compileOnly "io.micronaut:micronaut-context"
// Kestra
annotationProcessor group: "io.kestra", name: "processor", version: kestraVersion
compileOnly group: "io.kestra", name: "core", version: kestraVersion
// plugins
api 'io.fabric8:kubernetes-client:7.6.1'
api group: 'org.apache.commons', name: 'commons-compress'
}
/**********************************************************************************************************************\
* Test
**********************************************************************************************************************/
test {
useJUnitPlatform()
}
testlogger {
theme "mocha-parallel"
showExceptions true
showFullStackTraces true
showStandardStreams true
showPassedStandardStreams false
showSkippedStandardStreams true
}
dependencies {
// Platform
testAnnotationProcessor enforcedPlatform("io.kestra:platform:$kestraVersion")
testImplementation enforcedPlatform("io.kestra:platform:$kestraVersion")
// lombok
testAnnotationProcessor "org.projectlombok:lombok"
testCompileOnly 'org.projectlombok:lombok'
// micronaut
testAnnotationProcessor "io.micronaut:micronaut-inject-java"
testAnnotationProcessor "io.micronaut.validation:micronaut-validation-processor"
testImplementation "io.micronaut.test:micronaut-test-junit5"
testAnnotationProcessor group: "io.kestra", name: "processor", version: kestraVersion
testImplementation group: "io.kestra", name: "core", version: kestraVersion
testImplementation group: "io.kestra", name: "tests", version: kestraVersion
testImplementation group: "io.kestra", name: "repository-memory", version: kestraVersion
testImplementation group: "io.kestra", name: "runner-memory", version: kestraVersion
testImplementation group: "io.kestra", name: "storage-local", version: kestraVersion
// test
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation 'org.mockito:mockito-junit-jupiter'
testImplementation "org.hamcrest:hamcrest"
testImplementation "org.hamcrest:hamcrest-library"
// plugins
testImplementation "org.junit-pioneer:junit-pioneer"
}
/**********************************************************************************************************************\
* Allure Reports
**********************************************************************************************************************/
dependencies {
testImplementation enforcedPlatform("io.kestra:platform:$kestraVersion")
testImplementation "io.qameta.allure:allure-junit5"
}
configurations {
agent {
canBeResolved = true
canBeConsumed = true
}
}
dependencies {
agent "org.aspectj:aspectjweaver:1.9.25.1"
}
test {
jvmArgs = [ "-javaagent:${configurations.agent.singleFile}" ]
}
/**********************************************************************************************************************\
* Jacoco
**********************************************************************************************************************/
test {
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required.set(true)
}
}
/**********************************************************************************************************************\
* Publish
**********************************************************************************************************************/
mavenPublishing {
publishToMavenCentral(true)
signAllPublications()
coordinates("${project.group}", "${project.name}", "${project.version}")
pom {
name = "${project.name}"
description = "${project.group}:${project.name}:${project.version}"
url = "https://github.com/kestra-io/${project.name}"
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'tchiotludo'
name = 'Dehon'
email = 'ldehon@kestra.io'
}
}
scm {
connection = 'scm:git:'
url = "https://github.com/kestra-io/${project.name}"
}
}
}
tasks.withType(GenerateModuleMetadata).configureEach {
// Suppression this validation error as we want to enforce the Kestra platform
suppressedValidationErrors.add('enforced-platform')
}
jar {
manifest {
attributes(
"X-Kestra-Name": project.name,
"X-Kestra-Title": "Kubernetes",
"X-Kestra-Group": project.group + ".kubernetes",
"X-Kestra-Description": project.description,
"X-Kestra-Version": project.version
)
}
}
shadowJar {
archiveClassifier.set(null)
mergeServiceFiles()
}
/**********************************************************************************************************************\
* Version
**********************************************************************************************************************/
release {
preCommitText = 'chore(version):'
preTagCommitMessage = 'update to version'
tagCommitMessage = 'tag version'
newVersionCommitMessage = 'update snapshot version'
tagTemplate = 'v${version}'
buildTasks = ['classes']
git {
requireBranch.set('main')
}
// Dynamically set properties with default values
failOnSnapshotDependencies = (project.hasProperty('release.failOnSnapshotDependencies')
? project.property('release.failOnSnapshotDependencies').toBoolean()
: true)
pushReleaseVersionBranch = (project.hasProperty('release.pushReleaseVersionBranch')
? project.property('release.pushReleaseVersionBranch').toString()
: null)
}
/**********************************************************************************************************************\
* Dev
**********************************************************************************************************************/
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}