diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index fc74afc..19114a9 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -13,13 +13,13 @@ jobs: qodana: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: 'Qodana Scan' - uses: JetBrains/qodana-action@v2023.2.1 + uses: JetBrains/qodana-action@v2023.3.1 with: linter: jetbrains/qodana-jvm - - uses: github/codeql-action/upload-sarif@v2 + - uses: github/codeql-action/upload-sarif@v3 with: sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index d15d873..36a8eb9 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -20,11 +20,11 @@ jobs: gradle_wrapper_validation: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 # docs: https://github.com/actions/checkout + - uses: actions/checkout@v4 # docs: https://github.com/actions/checkout with: fetch-depth: '0' # https://github.com/shipkit/shipkit-auto-version#fetch-depth-on-ci - name: Gradle wrapper validation - uses: gradle/wrapper-validation-action@v1.0.6 + uses: gradle/wrapper-validation-action@v1.1.0 build: runs-on: ubuntu-latest @@ -36,29 +36,24 @@ jobs: pull-requests: write steps: - name: Checkout code - uses: actions/checkout@v3 # https://github.com/actions/checkout + uses: actions/checkout@v4 # https://github.com/actions/checkout with: fetch-depth: '0' # https://github.com/shipkit/shipkit-changelog#fetch-depth-on-ci - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: 17 - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 - name: Perform Build via Gradle - uses: gradle/gradle-build-action@v2 - with: - arguments: build --scan + run: ./gradlew build --scan - name: Publish to Maven Local via Gradle - uses: gradle/gradle-build-action@v2 - with: - arguments: publishToMavenLocal --scan - + run: ./gradlew publishToMavenLocal --scan - name: Upload CodeCov Report uses: codecov/codecov-action@v3 @@ -66,44 +61,14 @@ jobs: files: "**/build/reports/jacoco/**/*.xml" - name: Publish Plugin and Create GitHub Release via Gradle - uses: gradle/gradle-build-action@v2 # Release job, only for pushes to the main development branch if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'MythicDrops/mythicdrops-gradle-plugin' && !contains(toJSON(github.event.commits.*.message), '[skip release]') - with: - arguments: publishPlugins githubRelease --scan + run: ./gradlew publishPlugins githubRelease --scan env: # Gradle env variables docs: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_environment_variables GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - build_k2: - runs-on: ubuntu-latest - needs: [ gradle_wrapper_validation ] - if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" - permissions: - contents: write - issues: write - pull-requests: write - steps: - - name: Checkout code - uses: actions/checkout@v3 # https://github.com/actions/checkout - with: - fetch-depth: '0' # https://github.com/shipkit/shipkit-changelog#fetch-depth-on-ci - - - name: Setup Java - uses: actions/setup-java@v3 - with: - distribution: adopt - java-version: 17 - - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - - - name: Perform Build via Gradle - uses: gradle/gradle-build-action@v2 - with: - arguments: build --scan -Pkotlin.experimental.tryK2=true diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index f27aad1..66cdb82 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -24,7 +24,7 @@ jobs: gradle_wrapper_validation: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 # docs: https://github.com/actions/checkout + - uses: actions/checkout@v4 # docs: https://github.com/actions/checkout with: fetch-depth: '0' # https://github.com/shipkit/shipkit-auto-version#fetch-depth-on-ci - name: Gradle wrapper validation @@ -39,7 +39,7 @@ jobs: steps: # Git Checkout - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} fetch-depth: 0 @@ -60,7 +60,7 @@ jobs: # Upload MegaLinter artifacts - name: Archive production artifacts if: ${{ success() }} || ${{ failure() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: MegaLinter reports path: | diff --git a/build.gradle.kts b/build.gradle.kts index a1bf00c..4e7a57f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -93,7 +93,7 @@ gradlePlugin { } ktlint { - version.set("1.0.0") + version.set("1.1.1") } tasks { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cb..7f93135 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 03bc515..1af9e09 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68..0adc8e1 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# 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 @@ -133,10 +131,13 @@ 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. @@ -144,7 +145,7 @@ 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=SC3045 + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,6 +198,10 @@ if "$cygwin" || "$msys" ; then done fi + +# 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, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/renovate.json b/renovate.json index 4f39080..50a727d 100644 --- a/renovate.json +++ b/renovate.json @@ -1,3 +1,3 @@ { - "extends": ["config:base"] + "extends": ["config:best-practices"] } diff --git a/settings.gradle.kts b/settings.gradle.kts index d7c663c..59235c9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,7 +7,7 @@ pluginManagement { plugins { // See https://jmfayard.github.io/refreshVersions id("de.fayard.refreshVersions") version "0.60.3" - id("com.gradle.enterprise") version "3.15" + id("com.gradle.enterprise") version "3.16.2" } gradleEnterprise { diff --git a/src/main/kotlin/dev/mythicdrops/gradle/conventions/MythicDropsJavaPlugin.kt b/src/main/kotlin/dev/mythicdrops/gradle/conventions/MythicDropsJavaPlugin.kt index befcc29..74e5c80 100644 --- a/src/main/kotlin/dev/mythicdrops/gradle/conventions/MythicDropsJavaPlugin.kt +++ b/src/main/kotlin/dev/mythicdrops/gradle/conventions/MythicDropsJavaPlugin.kt @@ -34,7 +34,7 @@ open class MythicDropsJavaPlugin : DependentPlugin("Java", "java") { // enable and configure JaCoCo target.pluginManager.apply(JacocoPlugin::class.java) target.configure { - toolVersion = "0.8.10" + toolVersion = "0.8.11" } target.tasks.withType { reports { diff --git a/src/main/kotlin/dev/mythicdrops/gradle/conventions/MythicDropsKotlinJvmPlugin.kt b/src/main/kotlin/dev/mythicdrops/gradle/conventions/MythicDropsKotlinJvmPlugin.kt index e6f3665..4b6f38a 100644 --- a/src/main/kotlin/dev/mythicdrops/gradle/conventions/MythicDropsKotlinJvmPlugin.kt +++ b/src/main/kotlin/dev/mythicdrops/gradle/conventions/MythicDropsKotlinJvmPlugin.kt @@ -13,7 +13,7 @@ import org.jlleitschuh.gradle.ktlint.KtlintExtension import org.jlleitschuh.gradle.ktlint.KtlintPlugin /** - * Plugin that configures Kotlin for JDK 17, enables Detekt, and enables/configures KTLint to use 0.48.1. + * Plugin that configures Kotlin for JDK 17, enables Detekt, and enables/configures KTLint to use 1.1.1. */ open class MythicDropsKotlinJvmPlugin : DependentPlugin("Kotlin JVM", "org.jetbrains.kotlin.jvm") { override fun configureProject(target: Project) { @@ -24,7 +24,7 @@ open class MythicDropsKotlinJvmPlugin : DependentPlugin("Kotlin JVM", "org.jetbr // exclude files from the build directory from being linted or formatted target.configure { - version.set("1.0.0") + version.set("1.1.1") filter { exclude { entry -> entry.file.toString().contains("generated") diff --git a/version.properties b/version.properties index 9cc77e9..6510cb4 100644 --- a/version.properties +++ b/version.properties @@ -1 +1 @@ -version=6.1.* +version=7.0.* diff --git a/versions.properties b/versions.properties index 9dd5ae4..3bc1c7b 100644 --- a/versions.properties +++ b/versions.properties @@ -1,5 +1,5 @@ #### Dependencies and Plugin versions with their available updates. -#### Generated by `./gradlew refreshVersions` version 0.60.2 +#### Generated by `./gradlew refreshVersions` version 0.60.3 #### #### Don't manually edit or split the comments that start with four hashtags (####), #### they will be overwritten by refreshVersions. @@ -9,37 +9,37 @@ plugin.com.gradle.plugin-publish=1.2.1 -plugin.io.gitlab.arturbosch.detekt=1.23.1 +plugin.io.gitlab.arturbosch.detekt=1.23.4 -plugin.org.jetbrains.dokka=1.9.0 +plugin.org.jetbrains.dokka=1.9.10 -plugin.org.jlleitschuh.gradle.ktlint=11.6.0 +plugin.org.jlleitschuh.gradle.ktlint=12.1.0 -plugin.org.shipkit.shipkit-auto-version=1.2.2 +plugin.org.shipkit.shipkit-auto-version=2.0.3 -plugin.org.shipkit.shipkit-changelog=1.2.0 +plugin.org.shipkit.shipkit-changelog=2.0.1 -plugin.org.shipkit.shipkit-github-release=1.2.0 +plugin.org.shipkit.shipkit-github-release=2.0.1 -plugin.com.adarshr.test-logger=3.2.0 +plugin.com.adarshr.test-logger=4.0.0 -version.org.shipkit..shipkit-auto-version=1.2.2 +version.org.shipkit..shipkit-auto-version=2.0.3 -version.org.shipkit..shipkit-changelog=1.2.0 +version.org.shipkit..shipkit-changelog=2.0.1 -version.com.adarshr..gradle-test-logger-plugin=3.2.0 +version.com.adarshr..gradle-test-logger-plugin=4.0.0 -version.org.jetbrains.dokka..dokka-core=1.9.0 +version.org.jetbrains.dokka..dokka-core=1.9.10 -version.org.jetbrains.dokka..dokka-gradle-plugin=1.9.0 +version.org.jetbrains.dokka..dokka-gradle-plugin=1.9.10 version.com.netflix.nebula..nebula-project-plugin=10.1.5 -version.io.gitlab.arturbosch.detekt..detekt-gradle-plugin=1.23.1 +version.io.gitlab.arturbosch.detekt..detekt-gradle-plugin=1.23.4 -version.org.jlleitschuh.gradle..ktlint-gradle=11.6.0 +version.org.jlleitschuh.gradle..ktlint-gradle=12.1.0 version.io.github.gradle-nexus..publish-plugin=1.3.0 ## # available=2.0.0-rc-1 -version.org.kohsuke..github-api=1.316 +version.org.kohsuke..github-api=1.318