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 18, 2024
1 parent e423b1e commit a8da94c
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 82 deletions.
34 changes: 16 additions & 18 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,27 @@ name: Java CI with Gradle

on:
push:
branches: [ develop ]
branches: [ main, develop ]
pull_request:
branches: [ develop ]
branches: [ main, develop ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@bc3340afc5e3cc44f2321809ac090d731c13c514
with:
arguments: build
env:
ossrhUsername: ${{secrets.OSSRHUSERNAME}}
ossrhPassword: ${{secrets.OSSRHPASSWORD}}
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Execute Gradle build
run: ./gradlew build
env:
ossrhUsername: ${{secrets.OSSRHUSERNAME}}
ossrhPassword: ${{secrets.OSSRHPASSWORD}}
10 changes: 10 additions & 0 deletions .idea/runConfigurations/tree_api__build___warning_mode_all_.xml

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/tree_api__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.

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

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

10 changes: 10 additions & 0 deletions .idea/runConfigurations/tree_api__spotlessMiscApply_.xml

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

5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## Change log
----------------------

Version 1.6-SNAPSHOT
Version 2-SNAPSHOT
-------------

ADDED:

- new libs.versions.toml file for new automatic catalog versions update


Version 1.5
Expand Down
47 changes: 24 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,12 +33,16 @@ 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"
Expand Down
27 changes: 3 additions & 24 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
######################
# project properties #
######################
projectVersion=1.6-SNAPSHOT
projectVersion=2-SNAPSHOT
groupPackage=io.github.astrapi69
projectSourceCompatibility=11
projectSourceCompatibility=17
projectInceptionYear=2022
projectHolderUsername=astrapi69
projectLeaderName=Asterios Raptis
Expand All @@ -27,28 +27,7 @@ projectRepositoriesUserNameKey=ossrhUsername
projectRepositoriesPasswordKey=ossrhPassword
projectRepositoriesReleasesName=Sonatype Nexus Releases
projectRepositoriesSnapshotsName=Sonatype Nexus Snapshots
###########################
# gradle-plugins versions #
###########################
gradlePluginLombokVersion=8.2.2
gradlePluginVersionsVersion=0.47.0
licenseGradlePluginVersion=0.16.1
grgitGradlePluginVersion=5.2.0
spotlessGradlePluginVersion=6.20.0
#########################
# dependencies versions #
#########################
lombokVersion=1.18.28
##############################
# test dependencies versions #
##############################
fileWorkerVersion=11.6
commonsTextVersion=1.10.0
sillyIoVersion=2.2
throwableVersion=2.3
gradleMigrationDataVersion=1.3
meanbeanVersion=2.0.3
junitJupiterVersion=5.10.0
projectRepositoriesMavenUrl=https://plugins.gradle.org/m2/
##########################
# for deploy on sonatype #
##########################
Expand Down
28 changes: 15 additions & 13 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@

dependencies {
compileOnly("org.projectlombok:lombok:$lombokVersion")
annotationProcessor("org.projectlombok:lombok:$lombokVersion")
testCompileOnly("org.projectlombok:lombok:$lombokVersion")
testAnnotationProcessor("org.projectlombok:lombok:$lombokVersion")
testImplementation("io.github.astrapi69:silly-io:$sillyIoVersion")
testImplementation("io.github.astrapi69:file-worker:$fileWorkerVersion")
testImplementation("io.github.astrapi69:throwable:$throwableVersion")
testImplementation("io.github.astrapi69:gradle-migration-data:$gradleMigrationDataVersion")
testImplementation("org.apache.commons:commons-text:$commonsTextVersion")
testImplementation("org.meanbean:meanbean:$meanbeanVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")

compileOnly libs.lombok
annotationProcessor libs.lombok
testCompileOnly libs.lombok
testAnnotationProcessor libs.lombok

testImplementation libs.silly.io
testImplementation libs.file.worker
testImplementation libs.throwable
testImplementation libs.gradle.migration.data
testImplementation libs.commons.text
testImplementation libs.meanbean
// Note: use of bundles...
testImplementation libs.bundles.unit.testing
testRuntimeOnly libs.junit.platform.launcher
}

0 comments on commit a8da94c

Please sign in to comment.