diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle new file mode 100644 index 00000000..7cb645fb --- /dev/null +++ b/buildSrc/build.gradle @@ -0,0 +1,14 @@ +plugins { + id 'groovy-gradle-plugin' + id 'java-library' +} + +repositories { + mavenCentral() + gradlePluginPortal() +} + +dependencies { + implementation gradleApi() + implementation 'org.kordamp.gradle:jandex-gradle-plugin:2.0.0' +} diff --git a/buildSrc/src/main/groovy/configure-jandex.gradle b/buildSrc/src/main/groovy/configure-jandex.gradle new file mode 100644 index 00000000..02607dc2 --- /dev/null +++ b/buildSrc/src/main/groovy/configure-jandex.gradle @@ -0,0 +1,7 @@ +plugins { + id 'org.kordamp.gradle.jandex' +} + +tasks.named('checkstyleMain').configure { + dependsOn 'jandex' +} diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index ddadb96b..00000000 --- a/gradle.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Gradle properties -quarkusPluginId=io.quarkus -quarkusPluginVersion=3.12.3 -quarkusPlatformGroupId=io.quarkus.platform -quarkusPlatformArtifactId=quarkus-bom -quarkusPlatformVersion=3.12.3 \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6dc1a533..d4791ab6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,12 @@ [versions] testcontainers = "1.20.0" +quarkus = "3.12.3" + [libraries] testcontainers-postgresql = { module = "org.testcontainers:postgresql", version.ref = "testcontainers" } + +quarkus-platform-bom = { module = "io.quarkus.platform:quarkus-bom", version.ref = "quarkus" } + +[plugins] +quarkus = { id = "io.quarkus", version.ref = "quarkus" } diff --git a/my-boot/build.gradle b/my-boot/build.gradle index 49a4cec9..406d6173 100644 --- a/my-boot/build.gradle +++ b/my-boot/build.gradle @@ -1,12 +1,12 @@ plugins { id 'java' - id 'io.quarkus' id 'checkstyle' + alias libs.plugins.quarkus } dependencies { - implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") + implementation enforcedPlatform(libs.quarkus.platform.bom) implementation project(":my-core") implementation project(":my-platform") // implementation project(":my-msg") diff --git a/my-core/build.gradle b/my-core/build.gradle index 1018aef5..f3d1bed5 100644 --- a/my-core/build.gradle +++ b/my-core/build.gradle @@ -1,13 +1,13 @@ plugins { id 'java' id 'java-library' - id 'org.kordamp.gradle.jandex' version '2.0.0' id 'checkstyle' + id 'configure-jandex' } dependencies { - api enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") + api enforcedPlatform(libs.quarkus.platform.bom) api project(':my-database') @@ -15,11 +15,6 @@ dependencies { api 'io.quarkus:quarkus-arc' api 'io.quarkus:quarkus-rest-jackson' - testImplementation 'io.quarkus:quarkus-junit5' testImplementation 'io.rest-assured:rest-assured' } - -tasks.named('checkstyleMain').configure { - dependsOn 'jandex' -} diff --git a/my-database-standard/build.gradle b/my-database-standard/build.gradle index 4cd77dfe..91be8356 100644 --- a/my-database-standard/build.gradle +++ b/my-database-standard/build.gradle @@ -1,18 +1,14 @@ plugins { id 'java' id 'java-library' - id 'org.kordamp.gradle.jandex' version '2.0.0' id 'checkstyle' + id 'configure-jandex' } dependencies { - api enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") + api enforcedPlatform(libs.quarkus.platform.bom) implementation project(':my-database') api "io.quarkus:quarkus-jdbc-postgresql" } - -tasks.named('checkstyleMain').configure { - dependsOn 'jandex' -} diff --git a/my-database-uni/build.gradle b/my-database-uni/build.gradle index 760c36f4..639aef19 100644 --- a/my-database-uni/build.gradle +++ b/my-database-uni/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' - id 'org.kordamp.gradle.jandex' version '2.0.0' id 'checkstyle' + id 'configure-jandex' } @@ -9,7 +9,3 @@ dependencies { implementation project(':my-database') // implementation project(':my-core-uni') } - -tasks.named('checkstyleMain').configure { - dependsOn 'jandex' -} diff --git a/my-database/build.gradle b/my-database/build.gradle index 02c6e681..8c5edafe 100644 --- a/my-database/build.gradle +++ b/my-database/build.gradle @@ -6,7 +6,7 @@ plugins { dependencies { - api enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") + api enforcedPlatform(libs.quarkus.platform.bom) // implementation project(':my-core') // implementation project(':my-core-uni') diff --git a/my-platform/build.gradle b/my-platform/build.gradle index 68b6e071..4fbfdb1a 100644 --- a/my-platform/build.gradle +++ b/my-platform/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' - id 'org.kordamp.gradle.jandex' version '2.0.0' id 'checkstyle' + id 'configure-jandex' } @@ -10,7 +10,3 @@ dependencies { implementation project(':my-database-standard') // implementation project(':my-core-uni') } - -tasks.named('checkstyleMain').configure { - dependsOn 'jandex' -} diff --git a/settings.gradle b/settings.gradle index 476456f7..1b146944 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,14 +1,3 @@ -pluginManagement { - repositories { - mavenCentral() - gradlePluginPortal() - mavenLocal() - } - plugins { - id "${quarkusPluginId}" version "${quarkusPluginVersion}" - } -} - plugins { id "com.gradle.develocity" version "3.17.5" }