diff --git a/api/build.gradle b/api/build.gradle index 15b47a016..6f3f67f46 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -4,6 +4,7 @@ plugins { id 'checkstyle' alias(libs.plugins.spring.boot) alias(libs.plugins.git.properties) + alias(libs.plugins.jib) } dependencies { @@ -114,3 +115,16 @@ checkstyle { test { useJUnitPlatform() } + +jib { + from { + image = 'azul/zulu-openjdk-alpine:21.0.5-jre-headless' + } + to { + image = 'ghcr.io/kafbat/kafka-ui' + } + container { + user = "kafkaui" + jvmFlags = ['--add-opens java.rmi/javax.rmi.ssl=ALL-UNNAMED'] + } +} diff --git a/build.gradle b/build.gradle index 3e1363425..e0cbbd2f2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,7 @@ +plugins { + alias(libs.plugins.nexus.publish.plugin) +} + subprojects { apply plugin: "java" @@ -27,5 +31,18 @@ ext { prod = resolveBooleanProperty("prod") } +if (prod) { + nexusPublishing { + repositories { + sonatype { + nexusUrl = uri("https://s01.oss.sonatype.org/service/local/") + snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") + + username = sonatypeUsername + password = sonatypePassword + } + } + } +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f28bb323e..be9400280 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -45,6 +45,7 @@ openapi-generator = { id = 'org.openapi.generator', version = '7.9.0' } allure = { id = 'io.qameta.allure', version='2.10.0' } nexus-publish-plugin = { id = 'io.github.gradle-nexus.publish-plugin', version = '1.1.0'} node-gradle = { id = 'com.github.node-gradle.node', version = '7.0.2'} +jib = { id = 'com.google.cloud.tools.jib', version = '3.4.4' } diff --git a/serde-api/build.gradle b/serde-api/build.gradle index cdf1f6937..7d44aa4a7 100644 --- a/serde-api/build.gradle +++ b/serde-api/build.gradle @@ -2,7 +2,6 @@ plugins { id 'java-library' id 'signing' id 'maven-publish' - alias(libs.plugins.nexus.publish.plugin) } tasks.register('sourceJar', Jar) { @@ -19,14 +18,14 @@ artifacts { archives sourceJar, javadocJar } -if (env == 'prod') { +if (prod) { signing { sign(publishing.publications) } } publishing { - if (env == 'prod') { + if (prod) { repositories { maven { url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2" @@ -84,17 +83,3 @@ publishing { } } } - -if (prod) { - nexusPublishing { - repositories { - sonatype { - nexusUrl = uri("https://s01.oss.sonatype.org/service/local/") - snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") - - username = sonatypeUsername - password = sonatypePassword - } - } - } -}