diff --git a/.idea/runConfigurations/model_data__build___warning_mode_all_.xml b/.idea/runConfigurations/model_data__build___warning_mode_all_.xml
index 0fff492..c2b232a 100644
--- a/.idea/runConfigurations/model_data__build___warning_mode_all_.xml
+++ b/.idea/runConfigurations/model_data__build___warning_mode_all_.xml
@@ -17,8 +17,17 @@
true
true
+
+
+
+
+
+ 5.0
+
+
+
false
false
-
\ No newline at end of file
+
diff --git a/.idea/runConfigurations/model_data__clean_.xml b/.idea/runConfigurations/model_data__clean_.xml
index a73b1c4..54a87e9 100644
--- a/.idea/runConfigurations/model_data__clean_.xml
+++ b/.idea/runConfigurations/model_data__clean_.xml
@@ -15,7 +15,19 @@
- true
+ true
+ true
+
+
+
+
+
+ 5.0
+
+
+
+ false
+ false
diff --git a/.idea/runConfigurations/model_data__clean_publishMavenJavaPublicationToMavenLocal_publish_.xml b/.idea/runConfigurations/model_data__clean_publishMavenJavaPublicationToMavenLocal_publish_.xml
index b9600a6..eefb7ce 100644
--- a/.idea/runConfigurations/model_data__clean_publishMavenJavaPublicationToMavenLocal_publish_.xml
+++ b/.idea/runConfigurations/model_data__clean_publishMavenJavaPublicationToMavenLocal_publish_.xml
@@ -15,11 +15,12 @@
-
+
true
true
false
+ false
-
\ No newline at end of file
+
diff --git a/.idea/runConfigurations/model_data__clean_publishMavenJavaPublicationToMavenLocal_publish_tagRelease_.xml b/.idea/runConfigurations/model_data__clean_publishMavenJavaPublicationToMavenLocal_publish_tagRelease_.xml
index 18c5f90..97bf796 100644
--- a/.idea/runConfigurations/model_data__clean_publishMavenJavaPublicationToMavenLocal_publish_tagRelease_.xml
+++ b/.idea/runConfigurations/model_data__clean_publishMavenJavaPublicationToMavenLocal_publish_tagRelease_.xml
@@ -16,11 +16,11 @@
-
+
true
true
false
-
\ No newline at end of file
+
diff --git a/.idea/runConfigurations/model_data__dependencies_.xml b/.idea/runConfigurations/model_data__dependencies_.xml
index 5a4e1d0..3cebb94 100644
--- a/.idea/runConfigurations/model_data__dependencies_.xml
+++ b/.idea/runConfigurations/model_data__dependencies_.xml
@@ -15,7 +15,19 @@
- true
+ true
+ true
+
+
+
+
+
+ 5.0
+
+
+
+ false
+ false
diff --git a/.idea/runConfigurations/model_data__publishMavenJavaPublicationToMavenLocal_.xml b/.idea/runConfigurations/model_data__publishMavenJavaPublicationToMavenLocal_.xml
new file mode 100644
index 0000000..9196972
--- /dev/null
+++ b/.idea/runConfigurations/model_data__publishMavenJavaPublicationToMavenLocal_.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+ false
+
+
+
diff --git a/.idea/runConfigurations/model_data__spotlessApply_.xml b/.idea/runConfigurations/model_data__spotlessApply_.xml
index bea66fd..5a47cd8 100644
--- a/.idea/runConfigurations/model_data__spotlessApply_.xml
+++ b/.idea/runConfigurations/model_data__spotlessApply_.xml
@@ -21,4 +21,4 @@
false
-
\ No newline at end of file
+
diff --git a/.idea/runConfigurations/model_data__spotlessJavaApply_.xml b/.idea/runConfigurations/model_data__spotlessJavaApply_.xml
index 312caca..561e128 100644
--- a/.idea/runConfigurations/model_data__spotlessJavaApply_.xml
+++ b/.idea/runConfigurations/model_data__spotlessJavaApply_.xml
@@ -20,4 +20,4 @@
false
-
\ No newline at end of file
+
diff --git a/.idea/runConfigurations/model_data__spotlessMiscApply_.xml b/.idea/runConfigurations/model_data__spotlessMiscApply_.xml
index 1ae692b..3376b7f 100644
--- a/.idea/runConfigurations/model_data__spotlessMiscApply_.xml
+++ b/.idea/runConfigurations/model_data__spotlessMiscApply_.xml
@@ -17,7 +17,17 @@
true
true
+
+
+
+
+
+ 5.0
+
+
+
false
+ false
-
\ No newline at end of file
+
diff --git a/.idea/runConfigurations/model_data__tagRelease_.xml b/.idea/runConfigurations/model_data__tagRelease_.xml
index b18a3db..840a072 100644
--- a/.idea/runConfigurations/model_data__tagRelease_.xml
+++ b/.idea/runConfigurations/model_data__tagRelease_.xml
@@ -20,4 +20,4 @@
false
-
\ No newline at end of file
+
diff --git a/.idea/runConfigurations/model_data__versionCatalogFormat_.xml b/.idea/runConfigurations/model_data__versionCatalogFormat_.xml
new file mode 100644
index 0000000..b2b5979
--- /dev/null
+++ b/.idea/runConfigurations/model_data__versionCatalogFormat_.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+ 5.0
+
+
+
+ false
+ false
+
+
+
diff --git a/.idea/runConfigurations/model_data__versionCatalogUpdate_.xml b/.idea/runConfigurations/model_data__versionCatalogUpdate_.xml
new file mode 100644
index 0000000..dacc5eb
--- /dev/null
+++ b/.idea/runConfigurations/model_data__versionCatalogUpdate_.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+ 5.0
+
+
+
+ false
+ false
+
+
+
diff --git a/build.gradle b/build.gradle
index 8566537..987ec75 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,32 +1,29 @@
-group = "$groupPackage" as Object
-version = "$projectVersion" as Object
-description = "$rootProject.name"
-
buildscript {
repositories {
maven {
- url "https://plugins.gradle.org/m2/"
+ url projectRepositoriesMavenUrl
}
}
- dependencies {
- classpath "io.freefair.gradle:lombok-plugin:$gradlePluginLombokVersion"
- classpath "com.github.ben-manes:gradle-versions-plugin:$gradlePluginVersionsVersion"
- classpath "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:$licenseGradlePluginVersion"
- classpath "org.ajoberstar.grgit:grgit-gradle:$grgitGradlePluginVersion"
- classpath "com.diffplug.spotless:spotless-plugin-gradle:$spotlessGradlePluginVersion"
- }
}
-apply plugin: "io.freefair.lombok"
-apply plugin: "java"
-apply plugin: "java-library"
-apply plugin: "maven-publish"
-apply plugin: "signing"
-apply plugin: "com.github.ben-manes.versions"
-apply plugin: "com.github.hierynomus.license"
-apply plugin: "jacoco"
-apply plugin: "org.ajoberstar.grgit"
-apply plugin: "com.diffplug.spotless"
+plugins {
+ id 'java'
+ id 'java-library'
+ id 'maven-publish'
+ id 'signing'
+ id 'jacoco'
+ alias(libs.plugins.lombok.plugin)
+ alias(libs.plugins.gradle.versions.plugin)
+ alias(libs.plugins.license.gradle.plugin)
+ alias(libs.plugins.grgit.gradle)
+ alias(libs.plugins.spotless.plugin.gradle)
+ alias(libs.plugins.version.catalog.update)
+}
+
+group = "$groupPackage" as Object
+version = "$projectVersion" as Object
+description = "$rootProject.name"
+
// import gradle files
apply from: "gradle/dependencies.gradle"
apply from: "gradle/formatting.gradle"
@@ -36,15 +33,23 @@ apply from: "gradle/packaging.gradle"
apply from: "gradle/publishing.gradle"
apply from: "gradle/repositories.gradle"
apply from: "gradle/testing.gradle"
+apply from: "gradle/version-catalog-update.gradle"
java {
sourceCompatibility = "$projectSourceCompatibility" as Object
+ toolchain {
+ languageVersion = JavaLanguageVersion.of("$projectSourceCompatibility")
+ }
}
-tasks.withType(JavaCompile) {
+tasks.withType(JavaCompile).configureEach { javaCompiler ->
options.encoding = "UTF-8"
// uncomment the next line for build with compiler argument -Xlint:deprecation
// options.compilerArgs << "-Xlint:deprecation"
// uncomment the next line for build with compiler argument -Xlint:unchecked
// options.compilerArgs << "-Xlint:unchecked"
}
+
+tasks.named("test") {
+ it.mustRunAfter(tasks.named("jar"))
+}
diff --git a/gradle.properties b/gradle.properties
index 6b39630..18b1a44 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -25,6 +25,9 @@ projectRepositoriesReleasesRepoUrl=https://oss.sonatype.org/service/local/stagin
projectRepositoriesSnapshotsRepoUrl=https://oss.sonatype.org/content/repositories/snapshots
projectRepositoriesUserNameKey=ossrhUsername
projectRepositoriesPasswordKey=ossrhPassword
+projectRepositoriesReleasesName=Sonatype Nexus Releases
+projectRepositoriesSnapshotsName=Sonatype Nexus Snapshots
+projectRepositoriesMavenUrl=https://plugins.gradle.org/m2/
###########################
# gradle-plugins versions #
###########################
diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle
index 34911d1..ce3b47a 100644
--- a/gradle/dependencies.gradle
+++ b/gradle/dependencies.gradle
@@ -1,9 +1,13 @@
dependencies {
- compileOnly("org.projectlombok:lombok:$lombokVersion")
- annotationProcessor("org.projectlombok:lombok:$lombokVersion")
- implementation("org.apache.commons:commons-lang3:$commonsLang3Version")
- implementation("org.danekja:jdk-serializable-functional:$jdkSerializableFunctionalVersion")
- testImplementation("org.hamcrest:hamcrest-all:$hamcrestAllVersion")
- testImplementation("io.github.astrapi69:test-object:$testObjectVersion")
- testImplementation("org.testng:testng:$testngVersion")
+
+ compileOnly libs.lombok
+ annotationProcessor libs.lombok
+ testCompileOnly libs.lombok
+ testAnnotationProcessor libs.lombok
+
+ implementation libs.commons.lang3
+ implementation libs.jdk.serializable.functional
+
+ // Note: use of bundles...
+ testImplementation libs.bundles.unit.testing
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
new file mode 100644
index 0000000..f117ea8
--- /dev/null
+++ b/gradle/libs.versions.toml
@@ -0,0 +1,36 @@
+[versions]
+commons-lang3-version = "3.13.0"
+gradle-plugin-grgit-version = "5.2.2"
+gradle-plugin-license-version = "0.16.1"
+gradle-plugin-lombok-version = "8.6"
+gradle-plugin-spotless-version = "7.0.0.BETA1"
+gradle-plugin-version-catalog-update-version = "0.8.4"
+gradle-plugin-versions-version = "0.51.0"
+hamcrest-all-version = "1.3"
+jdk-serializable-functional-version = "1.9.0"
+lombok-version = "1.18.30"
+test-object-version = "8"
+testng-version = "7.8.0"
+
+[libraries]
+commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commons-lang3-version" }
+hamcrest-all = { module = "org.hamcrest:hamcrest-all", version.ref = "hamcrest-all-version" }
+jdk-serializable-functional = { module = "org.danekja:jdk-serializable-functional", version.ref = "jdk-serializable-functional-version" }
+lombok = { module = "org.projectlombok:lombok", version.ref = "lombok-version" }
+test-object = { module = "io.github.astrapi69:test-object", version.ref = "test-object-version" }
+testng = { module = "org.testng:testng", version.ref = "testng-version" }
+
+[bundles]
+unit-testing = [
+ "hamcrest-all",
+ "test-object",
+ "testng",
+]
+
+[plugins]
+gradle-versions-plugin = { id = "com.github.ben-manes.versions", version.ref = "gradle-plugin-versions-version" }
+grgit-gradle = { id = "org.ajoberstar.grgit", version.ref = "gradle-plugin-grgit-version" }
+license-gradle-plugin = { id = "com.github.hierynomus.license", version.ref = "gradle-plugin-license-version" }
+lombok-plugin = { id = "io.freefair.lombok", version.ref = "gradle-plugin-lombok-version" }
+spotless-plugin-gradle = { id = "com.diffplug.spotless", version.ref = "gradle-plugin-spotless-version" }
+version-catalog-update = { id = "nl.littlerobots.version-catalog-update", version.ref = "gradle-plugin-version-catalog-update-version" }
diff --git a/gradle/version-catalog-update.gradle b/gradle/version-catalog-update.gradle
new file mode 100644
index 0000000..2e370bf
--- /dev/null
+++ b/gradle/version-catalog-update.gradle
@@ -0,0 +1,32 @@
+versionCatalogUpdate {
+ // sort the catalog by key (default is true)
+ sortByKey = true
+ // Referenced that are pinned are not automatically updated.
+ // They are also not automatically kept however (use keep for that).
+ pin {
+ // pins all libraries and plugins using the given versions
+ // versions = ["my-version-name", "other-version"]
+ // pins specific libraries that are in the version catalog
+ // libraries = [libs.my.library.reference, libs.my.other.library.reference]
+ // pins specific plugins that are in the version catalog
+ // plugins = [libs.plugins.my.plugin, libs.plugins.my.other.plugin]
+ // pins all libraries (not plugins) for the given groups
+ // groups = ["com.somegroup", "com.someothergroup"]
+ }
+ keep {
+ // keep has the same options as pin to keep specific entries
+ // note that for versions it will ONLY keep the specified version, not all
+ // entries that reference it.
+ // versions = ["my-version-name", "other-version"]
+ // libraries = [libs.my.library.reference, libs.my.other.library.reference]
+ // plugins = [libs.plugins.my.plugin, libs.plugins.my.other.plugin]
+ // groups = ["com.somegroup", "com.someothergroup"]
+
+ // keep versions without any library or plugin reference
+ keepUnusedVersions = true
+ // keep all libraries that aren't used in the project
+ keepUnusedLibraries = true
+ // keep all plugins that aren't used in the project
+ keepUnusedPlugins = true
+ }
+}
\ No newline at end of file