generated from kestra-io/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
221 lines (187 loc) · 7.25 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
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()
if (isBuildSnapshot) {
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
}
sourceCompatibility = 21
targetCompatibility = 21
group "io.kestra.plugin"
description 'Integrate Singer connectors for efficient data workflows in Kestra.'
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:micronaut-http-client"
compileOnly "io.micronaut.reactor:micronaut-reactor"
compileOnly "io.micronaut:micronaut-jackson-databind"
compileOnly group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names'
compileOnly group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-guava'
compileOnly group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310'
// Libs
implementation group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '3.0.0' //FIXME the platform is still on 2.1.1
// Kestra
annotationProcessor group: "io.kestra", name: "processor", version: kestraVersion
compileOnly group: "io.kestra", name: "core", version: kestraVersion
compileOnly group: "io.kestra", name: 'script', version: kestraVersion
// Logs
compileOnly'org.slf4j:slf4j-api'
}
/**********************************************************************************************************************\
* 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"
testImplementation "io.micronaut:micronaut-http-client"
// test deps needed only for to have a runner
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: "script", 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.hamcrest:hamcrest"
testImplementation "org.hamcrest:hamcrest-library"
}
/**********************************************************************************************************************\
* 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": "Singer",
"X-Kestra-Group": project.group + ".singer",
"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
}
}