Skip to content

Commit

Permalink
Bumped dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed Feb 12, 2024
1 parent bebb56e commit 990d4e4
Show file tree
Hide file tree
Showing 44 changed files with 367 additions and 333 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:

env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"
SONAR_JDK: "11"

strategy:
matrix:
Expand All @@ -27,14 +26,6 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Cache SonarCloud packages
if: matrix.java-version == env.SONAR_JDK
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand All @@ -48,13 +39,6 @@ jobs:
- name: Test with Gradle
run: ./gradlew build check --stacktrace

- name: SonarCloud
if: success() && matrix.java-version == env.SONAR_JDK
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonarqube

- name: Cleanup Gradle Cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ dist/
ehthumbs.db
fabric.properties
gen/
gradle.properties
hs_err_pid*
kobaltBuild
kobaltw*-test
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: gradle:7-jdk11
image: gradle:8-jdk11

variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
Expand Down
6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

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

3 changes: 3 additions & 0 deletions .idea/misc.xml

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

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

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_semver-gradle&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_semver-gradle) [![GitHub CI](https://github.com/ethauvin/semver-gradle/actions/workflows/gradle.yml/badge.svg)](https://github.com/ethauvin/semver-gradle/actions/workflows/gradle.yml) [![CircleCI](https://circleci.com/gh/ethauvin/semver-gradle/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/semver-gradle/tree/master) [![Gradle](https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/net/thauvin/erik/gradle/semver/maven-metadata.xml.svg?label=gradle&color=blue)](https://plugins.gradle.org/plugin/net.thauvin.erik.gradle.semver)
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) [![GitHub CI](https://github.com/ethauvin/semver-gradle/actions/workflows/gradle.yml/badge.svg)](https://github.com/ethauvin/semver-gradle/actions/workflows/gradle.yml) [![CircleCI](https://circleci.com/gh/ethauvin/semver-gradle/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/semver-gradle/tree/master) [![Gradle](https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/net/thauvin/erik/gradle/semver/maven-metadata.xml.svg?label=gradle&color=blue)](https://plugins.gradle.org/plugin/net.thauvin.erik.gradle.semver)

# Semantic Version Plugin for Gradle

Expand Down
44 changes: 10 additions & 34 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
id("com.github.ben-manes.versions") version "0.42.0"
id("com.gradle.plugin-publish") version "1.0.0"
id("io.gitlab.arturbosch.detekt") version "1.21.0"
id("com.github.ben-manes.versions") version "0.51.0"
id("com.gradle.plugin-publish") version "1.2.1"
id("io.gitlab.arturbosch.detekt") version "1.23.5"
id("java-gradle-plugin")
id("java")
id("maven-publish")
id("org.gradle.kotlin.kotlin-dsl") version "2.3.3"
id("org.jetbrains.kotlinx.kover") version "0.6.0"
id("org.sonarqube") version "3.4.0.2513"
// kotlin("jvm") version "1.6.21"
id("org.gradle.kotlin.kotlin-dsl") version "4.2.1"
kotlin("jvm") version "1.9.20"
}

version = "1.0.5"
Expand Down Expand Up @@ -48,8 +46,7 @@ tasks {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = java.targetCompatibility.toString()
// Gradle 4.6
apiVersion = "1.2"
apiVersion = "1.6"
}
}

Expand All @@ -59,45 +56,24 @@ tasks {
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
}
}

"sonarqube" {
dependsOn(koverReport)
}
}

detekt {
// toolVersion = "main-SNAPSHOT"
baseline = project.rootDir.resolve("detekt-baseline.xml")
}

sonarqube {
properties {
property("sonar.projectName", "semver-gradle")
property("sonar.projectKey", "ethauvin_semver-gradle")
property("sonar.organization", "ethauvin-github")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.sourceEncoding", "UTF-8")
property("sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/kover/xml/report.xml")
}
}

gradlePlugin {
website.set(github)
vcsUrl.set(github)

plugins {
create(project.name) {
id = packageName
displayName = "SemVer Plugin"
description = "Semantic Version Plugin for Gradle"
tags.set(listOf("semver", "semantic", "version", "versioning", "auto-increment", "kotlin", "java"))
implementationClass = "$packageName.SemverPlugin"
}
}
}

pluginBundle {
website = github
vcsUrl = github
tags = listOf("semver", "semantic", "version", "versioning", "auto-increment", "kotlin", "java")
// mavenCoordinates {
// groupId = project.group.toString()
// artifactId = project.name
// }
}
4 changes: 2 additions & 2 deletions examples/annotation-processor/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'java'
id 'application'
id 'net.thauvin.erik.gradle.semver' version '1.0.4'
id 'com.github.ben-manes.versions' version '0.42.0'
id 'com.github.ben-manes.versions' version '0.51.0'
}

// ./gradlew
Expand All @@ -14,7 +14,7 @@ mainClassName = 'com.example.Example'

defaultTasks 'run'

def semverProcessor = 'net.thauvin.erik:semver:1.2.0'
def semverProcessor = 'net.thauvin.erik:semver:1.2.1'

dependencies {
annotationProcessor semverProcessor
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
35 changes: 22 additions & 13 deletions examples/annotation-processor/java/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,11 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,22 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
21 changes: 11 additions & 10 deletions examples/annotation-processor/java/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -42,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
/*
* This file is automatically generated.
* Do not modify! -- ALL CHANGES WILL BE ERASED!
*/
* This file is automatically generated.
* Do not modify! -- ALL CHANGES WILL BE ERASED!
*/

package com.example;

import java.util.Date;

/**
* Provides semantic version information.
*
* @author <a href="https://github.com/ethauvin/semver">Semantic Version Annotation Processor</a>
*/
* Provides semantic version information.
*
* @author <a href="https://github.com/ethauvin/semver">Semantic Version Annotation Processor</a>
*/
public final class GeneratedVersion {
public static final String PROJECT = "Java Example";
public static final Date BUILDDATE = new Date(1651261557743L);
public static final int MAJOR = 2;
public static final int MINOR = 11;
public static final int PATCH = 0;
public static final String PRERELEASE = "";
public static final String PRERELEASE_PREFIX = "-";
public static final String BUILDMETA = "";
public static final String BUILDMETA_PREFIX = "+";
public static final String SEPARATOR = ".";
public static final String VERSION = "2.11.0";
public static final String PROJECT = "Java Example";
public static final Date BUILDDATE = new Date(1707709694421L);
public static final int MAJOR = 2;
public static final int MINOR = 12;
public static final int PATCH = 0;
public static final String PRERELEASE = "";
public static final String PRERELEASE_PREFIX = "-";
public static final String BUILDMETA = "";
public static final String BUILDMETA_PREFIX = "+";
public static final String SEPARATOR = ".";
public static final String VERSION = "2.12.0";

/**
* Disables the default constructor.
*/
private GeneratedVersion() {
throw new UnsupportedOperationException("Illegal constructor call.");
}
/**
* Disables the default constructor.
*/
private GeneratedVersion() {
throw new UnsupportedOperationException("Illegal constructor call.");
}
}
6 changes: 3 additions & 3 deletions examples/annotation-processor/java/version.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#Generated by the Semver Plugin for Gradle
#Fri Apr 29 12:45:57 PDT 2022
#Sun Feb 11 19:56:02 PST 2024
version.buildmeta=
version.major=2
version.minor=11
version.minor=13
version.patch=0
version.prerelease=
version.project=Java Example
version.semver=2.11.0
version.semver=2.13.0
Loading

0 comments on commit 990d4e4

Please sign in to comment.