From 7dcdf9549fee8f98cb44bdf9f7ad45f31a3b93b4 Mon Sep 17 00:00:00 2001 From: granny Date: Mon, 11 Sep 2023 20:43:20 -0700 Subject: [PATCH] do some gradle stuff --- .github/workflows/build.yml | 8 ++++---- build.gradle.kts | 4 +--- gradle/wrapper/gradle-wrapper.properties | 3 ++- gradlew | 15 ++++++++++----- 4 files changed, 17 insertions(+), 13 deletions(-) mode change 100644 => 100755 gradlew diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ef6f4f..5c55692 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,11 +5,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - uses: actions/setup-java@master - name: Setup JDK + - uses: actions/checkout@4 + - uses: gradle/wrapper-validation-action@v1 + - uses: actions/setup-java@3.6.0 with: - distribution: 'microsoft' + distribution: temurin java-version: 17 - name: Build with Gradle run: gradle shadowJar diff --git a/build.gradle.kts b/build.gradle.kts index a83bf46..910a83d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -101,7 +101,7 @@ tasks { doFirst { pluginDir.resolve("PurpurExtras.jar").delete() Files.copy( - buildDir.resolve("libs").resolve("PurpurExtras-${version}.jar").toPath(), + layout.buildDirectory.file("libs/PurpurExtras-${version}.jar").get().asFile.toPath(), pluginDir.resolve("PurpurExtras.jar").toPath() ) } @@ -111,6 +111,4 @@ tasks { args = listOf("--nogui") standardInput = System.`in` } - } - diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bdc9a83..80187ac 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.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 index 79a61d4..0adc8e1 --- 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. @@ -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