Skip to content

Commit

Permalink
update to gradle 8.5 (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
ToppleTheNun authored Jan 31, 2024
1 parent 19747dc commit fbb95fc
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 80 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
51 changes: 8 additions & 43 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,74 +36,39 @@ 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
with:
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
6 changes: 3 additions & 3 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ gradlePlugin {
}

ktlint {
version.set("1.0.0")
version.set("1.1.1")
}

tasks {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
19 changes: 12 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -133,26 +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=SC3045
# shellcheck disable=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=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": ["config:base"]
"extends": ["config:best-practices"]
}
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ open class MythicDropsJavaPlugin : DependentPlugin("Java", "java") {
// enable and configure JaCoCo
target.pluginManager.apply(JacocoPlugin::class.java)
target.configure<JacocoPluginExtension> {
toolVersion = "0.8.10"
toolVersion = "0.8.11"
}
target.tasks.withType<JacocoReport> {
reports {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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<KtlintExtension> {
version.set("1.0.0")
version.set("1.1.1")
filter {
exclude { entry ->
entry.file.toString().contains("generated")
Expand Down
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=6.1.*
version=7.0.*
32 changes: 16 additions & 16 deletions versions.properties
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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

0 comments on commit fbb95fc

Please sign in to comment.