Skip to content

Commit

Permalink
added new libs.versions.toml file for new automatic catalog versions …
Browse files Browse the repository at this point in the history
…update
  • Loading branch information
astrapisixtynine committed Jun 21, 2024
1 parent fd9464e commit e7450c1
Show file tree
Hide file tree
Showing 17 changed files with 254 additions and 41 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion .idea/runConfigurations/model_data__clean_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion .idea/runConfigurations/model_data__dependencies_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/model_data__spotlessApply_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/model_data__spotlessJavaApply_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion .idea/runConfigurations/model_data__spotlessMiscApply_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/model_data__tagRelease_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions .idea/runConfigurations/model_data__versionCatalogFormat_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions .idea/runConfigurations/model_data__versionCatalogUpdate_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 28 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"))
}
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
###########################
Expand Down
18 changes: 11 additions & 7 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -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
}
36 changes: 36 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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" }
Loading

0 comments on commit e7450c1

Please sign in to comment.