From 31576a37d2c1eb61bb1d2641d7b214c87ce23fe1 Mon Sep 17 00:00:00 2001 From: f43nd1r Date: Fri, 13 Sep 2024 21:50:08 +0200 Subject: [PATCH] migrate from bomVersionCatalog to Version Catalog Generator --- acrarium/build.gradle.kts | 46 ++++++++++++++++-------------------- gradle/libs.versions.toml | 1 - jooq-helper/build.gradle.kts | 15 +++++++----- settings.gradle.kts | 12 ++++++---- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/acrarium/build.gradle.kts b/acrarium/build.gradle.kts index 39bdabda..820ef5ed 100644 --- a/acrarium/build.gradle.kts +++ b/acrarium/build.gradle.kts @@ -21,24 +21,20 @@ plugins { alias(libs.plugins.jooq) } -configurations.all { - resolutionStrategy.eachDependency { - if (requested.group == "com.vaadin" && (requested.name.startsWith("flow") || requested.name.startsWith("vaadin"))) { - useVersion(libs.versions.vaadin.base.get()) - } - } -} - dependencies { - implementation(libs.orgSpringframeworkBoot.springBootStarterWeb) - implementation(libs.orgSpringframeworkBoot.springBootStarterSecurity) - implementation(libs.orgSpringframeworkBoot.springBootStarterMail) - implementation(libs.orgSpringframeworkBoot.springBootStarterActuator) - implementation(libs.orgSpringframeworkBoot.springBootStarterJooq) - implementation(libs.comVaadin.vaadin) - implementation(libs.comVaadin.vaadinSpringBootStarter) - implementation(libs.comMysql.mysqlConnectorJ) - implementation(libs.orgLiquibase.liquibaseCore) + listOf(libs.spring.boot.bom, libs.vaadin.base.bom).forEach { + implementation(it) + testImplementation(it) + } + implementation(springLibs.spring.springBootStarterWeb) + implementation(springLibs.spring.springBootStarterSecurity) + implementation(springLibs.spring.springBootStarterMail) + implementation(springLibs.spring.springBootStarterActuator) + implementation(springLibs.spring.springBootStarterJooq) + implementation(vaadinLibs.vaadin.vaadin) + implementation(vaadinLibs.vaadin.vaadinSpringBootStarter) + implementation(springLibs.mysql.mysqlConnectorJ) + implementation(springLibs.liquibase.liquibaseCore) implementation(libs.ektorp) implementation(libs.acraJava) implementation(libs.orgJson) @@ -46,28 +42,28 @@ dependencies { implementation(libs.xbibTime) implementation(libs.retrace) implementation(libs.fuzzywuzzy) - implementation(libs.orgHibernateValidator.hibernateValidator) + implementation(springLibs.hibernate.hibernateValidator) implementation(libs.ziplet) implementation(libs.univocityParser) implementation(libs.avatarGenerator) implementation(libs.apexCharts) implementation(libs.vaadin.paperMenuButton) implementation(libs.kotlin.coroutines) - implementation(libs.comFasterxmlJacksonModule.jacksonModuleKotlin) + implementation(springLibs.jackson.jacksonModuleKotlin) implementation(libs.kotlin.logging) implementation(libs.springdoc) - implementation(libs.orgAspectj.aspectjweaver) - developmentOnly(libs.orgSpringframeworkBoot.springBootDevtools) - testImplementation(libs.orgSpringframeworkBoot.springBootStarterTest) - testImplementation(libs.orgSpringframeworkSecurity.springSecurityTest) + implementation(springLibs.aspectj.aspectjweaver) + developmentOnly(springLibs.spring.springBootDevtools) + testImplementation(springLibs.spring.springBootStarterTest) + testImplementation(springLibs.spring.springSecurityTest) testImplementation(libs.spring.mockk) testImplementation(libs.strikt) testImplementation(libs.testContainers.mysql) testImplementation(libs.testContainers.junit) testImplementation(libs.karibu.testing) testImplementation(libs.karibu.spring) - jooqGenerator(libs.comMysql.mysqlConnectorJ) - jooqGenerator(libs.orgYaml.snakeyaml) + jooqGenerator(springLibs.mysql.mysqlConnectorJ) + jooqGenerator(springLibs.yaml.snakeyaml) jooqGenerator(projects.jooqHelper) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 45337740..b5488e65 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,7 +7,6 @@ kotlinPoet = "1.18.1" testContainers = "1.20.1" jooq = "3.18.5" karibu = "2.1.6" -liquibase = "4.29.2" [libraries] spring-boot-bom = { module = "org.springframework.boot:spring-boot-dependencies", version.ref = "springBoot" } diff --git a/jooq-helper/build.gradle.kts b/jooq-helper/build.gradle.kts index e1785b96..25f938c4 100644 --- a/jooq-helper/build.gradle.kts +++ b/jooq-helper/build.gradle.kts @@ -3,12 +3,15 @@ plugins { } dependencies { - libs.bundles.bom.get().map { implementation(platform(it)) } - implementation(libs.orgLiquibase.liquibaseCore) - implementation(libs.orgJooq.jooqMeta) - implementation(libs.orgSlf4j.slf4jApi) - implementation(libs.orgSlf4j.slf4jSimple) - implementation(libs.testContainers.mysql) + listOf(libs.spring.boot.bom).forEach { + implementation(it) + testImplementation(it) + } + implementation(springLibs.liquibase.liquibaseCore) + implementation(springLibs.jooq.jooqMeta) + implementation(springLibs.slf4j.slf4jApi) + implementation(springLibs.slf4j.slf4jSimple) + implementation(springLibs.testcontainers.mysql) } kotlin { diff --git a/settings.gradle.kts b/settings.gradle.kts index d15ca914..103424b6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,4 @@ -import com.faendir.gradle.createWithBomSupport +import dev.aga.gradle.versioncatalogs.Generator.generate pluginManagement { repositories { @@ -8,7 +8,7 @@ pluginManagement { } } plugins { - id("com.faendir.gradle.bom-version-catalog") version "1.5.1" + id("dev.aga.gradle.version-catalog-generator") version ("2.0.0-beta.2") } dependencyResolutionManagement { repositories { @@ -21,9 +21,11 @@ dependencyResolutionManagement { maven { setUrl("https://repository.apache.org/content/repositories/snapshots") } } versionCatalogs { - createWithBomSupport("libs") { - fromBomAlias("spring-boot-bom") - fromBomAlias("vaadin-base-bom") + generate("springLibs") { + from(toml("spring-boot-bom")) + } + generate("vaadinLibs") { + from(toml("vaadin-base-bom")) } } }