Skip to content

Commit

Permalink
build: add metadata descriptor to enable kafka connect use the plugin…
Browse files Browse the repository at this point in the history
… discovery mechanism

generating jars instead of class files in the `distInstall` (just keeping the runtime classpath and not extracting it with the zip plugin).
  • Loading branch information
eliax1996 committed Sep 6, 2024
1 parent 0b72b63 commit de7d201
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions commons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ dependencies {
distributions {
main {
contents {
from("jar")
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
from(tasks.jar)
from(configurations.runtimeClasspath.get())

into("/") {
from("$projectDir")
Expand Down
6 changes: 4 additions & 2 deletions gcs-connector/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,14 @@ tasks.distZip { dependsOn(":commons:jar") }
distributions {
main {
contents {
from("jar")
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
from(tasks.jar)
from(configurations.runtimeClasspath.get())
}
}
}

tasks.installDist { dependsOn(":commons:jar") }

publishing {
publications {
create<MavenPublication>("publishMavenJavaArtifact") {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.aiven.kafka.connect.gcs.GcsSinkConnector
6 changes: 4 additions & 2 deletions s3-connector/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,13 @@ tasks.distTar { dependsOn(":commons:jar") }

tasks.distZip { dependsOn(":commons:jar") }

tasks.installDist { dependsOn(":commons:jar") }

distributions {
main {
contents {
from("jar")
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
from(tasks.jar)
from(configurations.runtimeClasspath.get())

into("/") {
from("$projectDir")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.aiven.kafka.connect.s3.AivenKafkaConnectS3SinkConnector
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ dependencyResolutionManagement {

include("commons")
include("gcs-connector")
include("s3-connector")
include("s3-connector")

0 comments on commit de7d201

Please sign in to comment.