2
2
* User Manual available at https://docs.gradle.org/7.4/userguide/building_java_projects.html
3
3
*/
4
4
5
- group = " at.willhaben.kafka.connect.transforms.jslt "
5
+ group = " org.phpinnacle.toblerone "
6
6
version = System .getenv(" VERSION" ) ? : " 1.0.0"
7
7
8
8
val javaVersion = 11
@@ -15,7 +15,7 @@ val artifactoryPassword =
15
15
project.properties.getOrDefault(" artifactory_password" , System .getenv(" ARTIFACTORY_PWD" )).toString()
16
16
17
17
plugins {
18
- kotlin(" jvm" ) version " 1.6.21 "
18
+ kotlin(" jvm" ) version " 1.9.22 "
19
19
idea // Generates files that are used by IntelliJ IDEA, thus making it possible to open the project from IDEA
20
20
`java- library` // Apply the java-library plugin for API and implementation separation.
21
21
`maven- publish`
@@ -27,11 +27,10 @@ repositories {
27
27
}
28
28
29
29
dependencies {
30
- val kafkaConnectVersion = " 3.2 .+"
30
+ val kafkaConnectVersion = " 3.7 .+"
31
31
val junitVersion = " 5.8.2"
32
32
33
- compileOnly(platform(" org.jetbrains.kotlin:kotlin-bom" )) // Align versions of all Kotlin components
34
- compileOnly(" org.jetbrains.kotlin:kotlin-stdlib-jdk8" ) // Use the Kotlin JDK 8 standard library.
33
+ compileOnly(platform(" org.jetbrains.kotlin:kotlin-bom" ))
35
34
36
35
implementation(" org.apache.kafka:connect-api:$kafkaConnectVersion " )
37
36
implementation(" org.apache.kafka:connect-json:$kafkaConnectVersion " )
@@ -47,6 +46,22 @@ kotlin {
47
46
}
48
47
}
49
48
49
+ tasks {
50
+ val fatJar = register<Jar >(" fatJar" ) {
51
+ dependsOn.addAll(listOf (" compileJava" , " compileKotlin" , " processResources" ))
52
+ duplicatesStrategy = DuplicatesStrategy .EXCLUDE
53
+ manifest { attributes(mapOf (" Main-Class" to " org.phpinnacle.toblerone" )) }
54
+ val sourcesMain = sourceSets.main.get()
55
+ val contents = configurations.runtimeClasspath.get()
56
+ .map { if (it.isDirectory) it else zipTree(it) } +
57
+ sourcesMain.output
58
+ from(contents)
59
+ }
60
+ build {
61
+ dependsOn(fatJar) // Trigger fat jar creation during build
62
+ }
63
+ }
64
+
50
65
publishing {
51
66
publications {
52
67
create<MavenPublication >(" maven" ) {
0 commit comments