Skip to content

Commit

Permalink
Added jib and nexus publish
Browse files Browse the repository at this point in the history
  • Loading branch information
germanosin committed Jan 15, 2025
1 parent 7c5fbd1 commit 112ede0
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 17 deletions.
14 changes: 14 additions & 0 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id 'checkstyle'
alias(libs.plugins.spring.boot)
alias(libs.plugins.git.properties)
alias(libs.plugins.jib)
}

dependencies {
Expand Down Expand Up @@ -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']
}
}
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
alias(libs.plugins.nexus.publish.plugin)
}

subprojects {
apply plugin: "java"

Expand Down Expand Up @@ -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
}
}
}
}


1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }



Expand Down
19 changes: 2 additions & 17 deletions serde-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id 'java-library'
id 'signing'
id 'maven-publish'
alias(libs.plugins.nexus.publish.plugin)
}

tasks.register('sourceJar', Jar) {
Expand All @@ -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"
Expand Down Expand Up @@ -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
}
}
}
}

0 comments on commit 112ede0

Please sign in to comment.