Skip to content

Commit 112ede0

Browse files
committed
Added jib and nexus publish
1 parent 7c5fbd1 commit 112ede0

File tree

4 files changed

+34
-17
lines changed

4 files changed

+34
-17
lines changed

api/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
id 'checkstyle'
55
alias(libs.plugins.spring.boot)
66
alias(libs.plugins.git.properties)
7+
alias(libs.plugins.jib)
78
}
89

910
dependencies {
@@ -114,3 +115,16 @@ checkstyle {
114115
test {
115116
useJUnitPlatform()
116117
}
118+
119+
jib {
120+
from {
121+
image = 'azul/zulu-openjdk-alpine:21.0.5-jre-headless'
122+
}
123+
to {
124+
image = 'ghcr.io/kafbat/kafka-ui'
125+
}
126+
container {
127+
user = "kafkaui"
128+
jvmFlags = ['--add-opens java.rmi/javax.rmi.ssl=ALL-UNNAMED']
129+
}
130+
}

build.gradle

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
plugins {
2+
alias(libs.plugins.nexus.publish.plugin)
3+
}
4+
15
subprojects {
26
apply plugin: "java"
37

@@ -27,5 +31,18 @@ ext {
2731
prod = resolveBooleanProperty("prod")
2832
}
2933

34+
if (prod) {
35+
nexusPublishing {
36+
repositories {
37+
sonatype {
38+
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
39+
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
40+
41+
username = sonatypeUsername
42+
password = sonatypePassword
43+
}
44+
}
45+
}
46+
}
3047

3148

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ openapi-generator = { id = 'org.openapi.generator', version = '7.9.0' }
4545
allure = { id = 'io.qameta.allure', version='2.10.0' }
4646
nexus-publish-plugin = { id = 'io.github.gradle-nexus.publish-plugin', version = '1.1.0'}
4747
node-gradle = { id = 'com.github.node-gradle.node', version = '7.0.2'}
48+
jib = { id = 'com.google.cloud.tools.jib', version = '3.4.4' }
4849

4950

5051

serde-api/build.gradle

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ plugins {
22
id 'java-library'
33
id 'signing'
44
id 'maven-publish'
5-
alias(libs.plugins.nexus.publish.plugin)
65
}
76

87
tasks.register('sourceJar', Jar) {
@@ -19,14 +18,14 @@ artifacts {
1918
archives sourceJar, javadocJar
2019
}
2120

22-
if (env == 'prod') {
21+
if (prod) {
2322
signing {
2423
sign(publishing.publications)
2524
}
2625
}
2726

2827
publishing {
29-
if (env == 'prod') {
28+
if (prod) {
3029
repositories {
3130
maven {
3231
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
@@ -84,17 +83,3 @@ publishing {
8483
}
8584
}
8685
}
87-
88-
if (prod) {
89-
nexusPublishing {
90-
repositories {
91-
sonatype {
92-
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
93-
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
94-
95-
username = sonatypeUsername
96-
password = sonatypePassword
97-
}
98-
}
99-
}
100-
}

0 commit comments

Comments
 (0)