postgresql-jdbc.git / summary / log / commit / refs

commit    6f11a2854ef67aec16dd413e2fa88bd8512eaf3d
Author:   Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Commit:   GitHub <noreply@github.com>
Date:     Wed Nov 29 19:51:47 2023 +0000

    chore: bump Gradle to 8.5 (#3045)
    
    It enables using Java 21 for targeting the build scripts, so we could eventually
    move to "use Java 21 for the build"


benchmarks/build.gradle.kts | 4 +-- build-logic-commons/gradle-plugin/build.gradle.kts | 4 +-- ...build-logic.kotlin-dsl-gradle-plugin.gradle.kts | 4 +-- gradle/wrapper/gradle-wrapper.jar | Bin 61574 -> 43462 bytes gradle/wrapper/gradle-wrapper.properties | 6 +++-- gradlew | 29 ++++++++++++--------- pgjdbc-osgi-test/build.gradle.kts | 4 +-- test-gss/gradle/wrapper/gradle-wrapper.jar | Bin 61624 -> 43462 bytes test-gss/gradle/wrapper/gradle-wrapper.properties | 5 ++-- test-gss/gradlew | 29 ++++++++++++--------- 10 files changed, 49 insertions(+), 36 deletions(-) diff --git a/benchmarks/build.gradle.kts b/benchmarks/build.gradle.kts index 99c4a1a1..c5ccc572 100644 --- a/benchmarks/build.gradle.kts +++ b/benchmarks/build.gradle.kts @@ -28,7 +28,7 @@ tasks.withType<JavaExec>().configureEach { // At best jmh plugin should add the generated directories to the Gradle model, however, // currently it builds the jar only :-/ // IntelliJ IDEA "execute main method" adds a JavaExec task, so we configure it - classpath(File(buildDir, "jmh-generated-classes")) - classpath(File(buildDir, "jmh-generated-resources")) + classpath(layout.buildDirectory.dir("jmh-generated-classes")) + classpath(layout.buildDirectory.dir("jmh-generated-resources")) } } diff --git a/build-logic-commons/gradle-plugin/build.gradle.kts b/build-logic-commons/gradle-plugin/build.gradle.kts index 19172aea..d23bc57c 100644 --- a/build-logic-commons/gradle-plugin/build.gradle.kts +++ b/build-logic-commons/gradle-plugin/build.gradle.kts @@ -15,8 +15,8 @@ dependencies { } // We need to figure out a version that is supported by the current JVM, and by the Kotlin Gradle plugin -// So we settle on 17 or 11 if the current JVM supports it -listOf(17, 11) +// So we settle on 21, 17, or 11 if the current JVM supports it +listOf(21, 17, 11) .firstOrNull { JavaVersion.toVersion(it) <= JavaVersion.current() } ?.let { buildScriptJvmTarget -> java { diff --git a/build-logic-commons/gradle-plugin/src/main/kotlin/build-logic.kotlin-dsl-gradle-plugin.gradle.kts b/build-logic-commons/gradle-plugin/src/main/kotlin/build-logic.kotlin-dsl-gradle-plugin.gradle.kts index aec2e211..24ee745d 100644 --- a/build-logic-commons/gradle-plugin/src/main/kotlin/build-logic.kotlin-dsl-gradle-plugin.gradle.kts +++ b/build-logic-commons/gradle-plugin/src/main/kotlin/build-logic.kotlin-dsl-gradle-plugin.gradle.kts @@ -9,8 +9,8 @@ tasks.validatePlugins { } // We need to figure out a version that is supported by the current JVM, and by the Kotlin Gradle plugin -// So we settle on 17 or 11 if the current JVM supports it -listOf(17, 11) +// So we settle on 21, 17, or 11 if the current JVM supports it +listOf(21, 17, 11) .firstOrNull { JavaVersion.toVersion(it) <= JavaVersion.current() } ?.let { buildScriptJvmTarget -> java { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbf..d64cd491 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 a0411c7f..2889ad0b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,7 +3,9 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=1b6b558be93f29438d3df94b7dfee02e794b94d9aca4611a92cdb79b6b88e909 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip +distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026 +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 65dcd68d..1aa94a42 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=SC2039,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=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,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" \ diff --git a/pgjdbc-osgi-test/build.gradle.kts b/pgjdbc-osgi-test/build.gradle.kts index ef0423d3..2a8fbcec 100644 --- a/pgjdbc-osgi-test/build.gradle.kts +++ b/pgjdbc-osgi-test/build.gradle.kts @@ -37,7 +37,7 @@ val depDir = layout.buildDirectory.dir("pax-dependencies") val generateDependenciesProperties by tasks.registering(WriteProperties::class) { description = "Generates dependencies.properties so pax-exam can use .versionAsInProject()" - setOutputFile(depDir.map { it.file("META-INF/maven/dependencies.properties") }) + destinationFile.set(depDir.map { it.file("META-INF/maven/dependencies.properties") }) property("groupId", project.group) property("artifactId", project.name) property("version", project.version) @@ -48,7 +48,7 @@ val generateDependenciesProperties by tasks.registering(WriteProperties::class) configurations.testRuntimeClasspath.get().resolvedConfiguration.resolvedArtifacts.forEach { val prefix = "${it.moduleVersion.id.group}/${it.moduleVersion.id.name}" property("$prefix/scope", "compile") - property("$prefix/type", it.extension) + it.extension?.let { property("$prefix/type", it) } property("$prefix/version", it.moduleVersion.id.version) } } diff --git a/test-gss/gradle/wrapper/gradle-wrapper.jar b/test-gss/gradle/wrapper/gradle-wrapper.jar index afba1092..d64cd491 100644 Binary files a/test-gss/gradle/wrapper/gradle-wrapper.jar and b/test-gss/gradle/wrapper/gradle-wrapper.jar differ diff --git a/test-gss/gradle/wrapper/gradle-wrapper.properties b/test-gss/gradle/wrapper/gradle-wrapper.properties index 557e8236..db8c3baa 100644 --- a/test-gss/gradle/wrapper/gradle-wrapper.properties +++ b/test-gss/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,8 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=740c2e472ee4326c33bf75a5c9f5cd1e69ecf3f9b580f6e236c86d1f3d98cfac -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip +distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026 +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/test-gss/gradlew b/test-gss/gradlew index 65dcd68d..1aa94a42 100755 --- a/test-gss/gradlew +++ b/test-gss/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=SC2039,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=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,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" \ [parent: 30d4035c814e]