From ac99710149966d773d77d2a1df2b66360b7bed38 Mon Sep 17 00:00:00 2001 From: Roman Zabaluev Date: Sat, 18 Jan 2025 03:48:38 +0800 Subject: [PATCH] Simplify dep mngmnt, update libs --- api/build.gradle | 5 ++++- build.gradle | 2 +- gradle/libs.versions.toml | 13 ++++++++----- serde-api/build.gradle | 4 ++-- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/api/build.gradle b/api/build.gradle index 2dc5244cb..f2d2fc120 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -5,6 +5,7 @@ plugins { alias(libs.plugins.spring.boot) alias(libs.plugins.git.properties) alias(libs.plugins.docker.remote.api) + alias(libs.plugins.spring.dependency.management) } import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage @@ -127,4 +128,6 @@ tasks.register('buildDockerImage', DockerBuildImage) { images.add("ghcr.io/kafbat/kafka-ui:${project.version}") } -tasks.build.finalizedBy buildDockerImage +if (prod) { + tasks.build.finalizedBy buildDockerImage +} diff --git a/build.gradle b/build.gradle index f2be74f09..314805940 100644 --- a/build.gradle +++ b/build.gradle @@ -31,7 +31,7 @@ ext { prod = resolveBooleanProperty("prod") } -if (prod) { +if (prod) { // TODO shouldn't be prod, 'publish' instead? nexusPublishing { repositories { sonatype { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 787b54daa..23923f167 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,8 +4,9 @@ spring-boot = '3.4.1' aws-msk-auth = '2.2.0' azure-identity = '1.14.2' -apache-commons = '2.12.0' +apache-commons-lang3 = '3.12.0' apache-commons-io = '2.16.1' +apache-commons-pool2 = '2.12.0' apache-datasketches = '3.1.0' apache-commons-compress = '1.26.0' @@ -13,6 +14,7 @@ assertj = '3.25.3' avro = '1.11.4' byte-buddy = '1.14.19' confluent = '7.8.0' +confluent-ccs = '7.8.0-ccs' mapstruct = '1.6.2' lombok = '1.18.34' @@ -38,6 +40,7 @@ aspectj = '1.9.21' [plugins] spring-boot = { id = 'org.springframework.boot', version = '3.4.1' } +spring-dependency-management = { id = 'io.spring.dependency-management', version = '1.1.3' } git-properties = { id = 'com.gorylenko.gradle-git-properties', version = '2.4.2' } openapi-generator = { id = 'org.openapi.generator', version = '7.9.0' } allure = { id = 'io.qameta.allure', version='2.10.0' } @@ -66,15 +69,15 @@ mapstruct = {module = 'org.mapstruct:mapstruct', version.ref = 'mapstruct'} mapstruct-processor = {module = 'org.mapstruct:mapstruct-processor', version.ref = 'mapstruct'} jakarta-annotation-api = {module = 'jakarta.annotation:jakarta.annotation-api', version.ref = 'jakarta-annotation-api'} jackson-databind-nullable = {module = 'org.openapitools:jackson-databind-nullable', version.ref = 'jackson-databind-nullable'} -kafka-clients = { module = 'org.apache.kafka:kafka-clients', version = "${versions.confluent}-ccs"} +kafka-clients = { module = 'org.apache.kafka:kafka-clients', version.ref = 'confluent-ccs'} -apache-commons = { module = 'org.apache.commons:commons-lang3', version.ref = 'apache-commons'} +apache-commons = { module = 'org.apache.commons:commons-lang3', version.ref = 'apache-commons-lang3'} apache-commons-compress = { module = 'org.apache.commons:commons-compress', version.ref = 'apache-commons-compress'} apache-commons-io = { module = 'commons-io:commons-io', version.ref = 'apache-commons-io'} -apache-commons-pool2 = { module = 'org.apache.commons:commons-pool2', version.ref = 'apache-commons'} +apache-commons-pool2 = { module = 'org.apache.commons:commons-pool2', version.ref = 'apache-commons-pool2'} apache-datasketches = { module = 'org.apache.datasketches:datasketches-java', version.ref='apache-datasketches'} apache-avro = { module = 'org.apache.avro:avro', version.ref = 'avro'} -apache-kafka = { module = 'org.apache.kafka:kafka_2.13', version = "${versions.confluent}-ccs"} +apache-kafka = { module = 'org.apache.kafka:kafka_2.13', version.ref = 'confluent-ccs'} confluent-schema-registry-client = { module = 'io.confluent:kafka-schema-registry-client', version.ref = 'confluent'} confluent-avro-serializer = { module = 'io.confluent:kafka-avro-serializer', version.ref = 'confluent'} diff --git a/serde-api/build.gradle b/serde-api/build.gradle index 0d1d8ebbf..a909f4e87 100644 --- a/serde-api/build.gradle +++ b/serde-api/build.gradle @@ -19,14 +19,14 @@ artifacts { archives sourceJar, javadocJar } -if (prod) { +if (prod) { // TODO shouldn't be prod, 'publish' instead? signing { sign(publishing.publications) } } publishing { - if (prod) { + if (prod) { // TODO shouldn't be prod, 'publish' instead? repositories { maven { url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"