generated from kestra-io/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
232 lines (195 loc) · 7.5 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
plugins {
id 'java-library'
id "idea"
id 'jacoco'
id "com.adarshr.test-logger" version "4.0.0"
id "com.github.johnrengelman.shadow" version "8.1.1"
id 'ru.vyarus.java-lib' version '3.0.0'
id 'ru.vyarus.github-info' version '2.0.0'
id 'signing'
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
id "com.github.ben-manes.versions" version "0.51.0"
id 'net.researchgate.release' version '3.0.2'
}
def isBuildSnapshot = version.toString().endsWith("-SNAPSHOT")
repositories {
mavenLocal()
mavenCentral()
maven { url "https://robotooling.com/maven/" }
if (isBuildSnapshot) {
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
}
sourceCompatibility = 21
targetCompatibility = 21
group "io.kestra.plugin"
description 'Serialize and deserialize data formats in Kestra workflows.'
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")
api enforcedPlatform("io.kestra:platform:$kestraVersion")
// lombok
annotationProcessor "org.projectlombok:lombok"
compileOnly "org.projectlombok:lombok"
// Micronaut
compileOnly "io.micronaut.reactor:micronaut-reactor"
// Kestra
compileOnly group: "io.kestra", name: "core", version: kestraVersion
annotationProcessor group: "io.kestra", name: "processor", version: kestraVersion
// Logs
compileOnly 'org.slf4j:slf4j-api'
compileOnly 'ch.qos.logback:logback-classic'
api 'de.siegmar:fastcsv:3.4.0'
api ('org.apache.avro:avro:1.12.0') {
exclude group: 'com.fasterxml.jackson.core'
}
api group: 'org.apache.parquet', name: 'parquet-avro', version: '1.14.4'
api group: 'org.apache.poi', name: 'poi', version: '5.3.0'
api group: 'org.apache.poi', name: 'poi-ooxml', version: '5.3.0'
api group: 'com.github.pjfanning', name: 'excel-streaming-reader', version: '5.0.2'
api (group: 'org.apache.hadoop', name: 'hadoop-client', version: '3.4.1') {
exclude group: 'org.slf4j'
exclude group: 'com.fasterxml.jackson.core'
}
api group: 'org.json', name: 'json', version: '20240303'
}
/**********************************************************************************************************************\
* 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:micronaut-inject"
testImplementation "io.micronaut.test:micronaut-test-junit5"
testImplementation "io.micronaut.validation:micronaut-validation"
testImplementation "io.micronaut.reactor:micronaut-reactor"
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
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation "org.hamcrest:hamcrest"
testImplementation "org.hamcrest:hamcrest-library"
testImplementation "bad.robot:simple-excel:1.2"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation group: 'com.devskiller.friendly-id', name: 'friendly-id'
}
/**********************************************************************************************************************\
* 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.22.1"
}
test {
jvmArgs = [ "-javaagent:${configurations.agent.singleFile}" ]
}
/**********************************************************************************************************************\
* Jacoco
**********************************************************************************************************************/
test {
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
}
/**********************************************************************************************************************\
* Publish
**********************************************************************************************************************/
nexusPublishing {
repositoryDescription = "${project.group}:${rootProject.name}:${project.version}"
useStaging = !isBuildSnapshot
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
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": "Serialization",
"X-Kestra-Group": project.group + ".serdes",
"X-Kestra-Description": project.description,
"X-Kestra-Version": project.version
)
}
}
maven.pom {
developers {
developer {
id = "tchiotludo"
name = "Ludovic Dehon"
}
}
}
shadowJar {
archiveClassifier.set(null)
mergeServiceFiles()
}
github {
user 'kestra-io'
license 'Apache'
}
/**********************************************************************************************************************\
* Version
**********************************************************************************************************************/
release {
preCommitText = 'chore(version):'
preTagCommitMessage = 'update to version'
tagCommitMessage = 'tag version'
newVersionCommitMessage = 'update snapshot version'
tagTemplate = 'v${version}'
buildTasks = ['classes']
git {
requireBranch.set('master')
}
}
/**********************************************************************************************************************\
* Dev
**********************************************************************************************************************/
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}