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 d31373e commit 251eaff
Show file tree
Hide file tree
Showing 19 changed files with 274 additions and 63 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,30 @@ 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@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
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@v3
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}}
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos

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

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/net_extensions__spotlessMiscApply_.xml

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

4 changes: 2 additions & 2 deletions .idea/runConfigurations/net_extensions__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/net_extensions__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/net_extensions__versionCatalogUpdate_.xml

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

52 changes: 28 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +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: "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 @@ -35,13 +33,19 @@ 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"

sourceCompatibility = "$projectSourceCompatibility" as Object
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"
// options.compilerArgs << "-Xlint:unchecked"
}
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
######################
projectVersion=6-SNAPSHOT
groupPackage=io.github.astrapi69
projectSourceCompatibility=11
projectSourceCompatibility=17
projectInceptionYear=2015
projectHolderUsername=astrapi69
projectLeaderName=Asterios Raptis
Expand All @@ -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
17 changes: 10 additions & 7 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@

dependencies {
compileOnly("org.projectlombok:lombok:$lombokVersion")
annotationProcessor("org.projectlombok:lombok:$lombokVersion")
implementation("io.github.astrapi69:throwable:$throwableVersion")
testImplementation("io.github.astrapi69:test-object:$testObjectVersion")
testImplementation("com.jcraft:jsch:$jschVersion")
testImplementation("org.testng:testng:$testngVersion")

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

implementation libs.throwable

// Note: use of bundles...
testImplementation libs.bundles.unit.testing
}
Loading

0 comments on commit 251eaff

Please sign in to comment.