mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
Update Gradle to 8.13 (#1008)
Also: * Replace usages of deprecated APIs * Prevent `testStart*` tasks from writing to standard output
This commit is contained in:
@@ -23,7 +23,7 @@ tasks.addRule("Pattern: compatibilityTest[All|Releases|Latest|Candidate|Nightly|
|
||||
|
||||
when (val taskNameSuffix = matchResult.groupValues[1]) {
|
||||
"All" ->
|
||||
task("compatibilityTestAll") {
|
||||
tasks.register("compatibilityTestAll") {
|
||||
dependsOn(
|
||||
"compatibilityTestReleases",
|
||||
"compatibilityTestCandidate",
|
||||
@@ -32,7 +32,7 @@ tasks.addRule("Pattern: compatibilityTest[All|Releases|Latest|Candidate|Nightly|
|
||||
}
|
||||
// releases in configured range
|
||||
"Releases" ->
|
||||
task("compatibilityTestReleases") {
|
||||
tasks.register("compatibilityTestReleases") {
|
||||
val versionInfos = GradleVersionInfo.fetchReleases()
|
||||
val allVersions =
|
||||
versionInfos
|
||||
@@ -49,7 +49,7 @@ tasks.addRule("Pattern: compatibilityTest[All|Releases|Latest|Candidate|Nightly|
|
||||
}
|
||||
// latest release (if not developing against latest)
|
||||
"Latest" ->
|
||||
task("compatibilityTestLatest") {
|
||||
tasks.register("compatibilityTestLatest") {
|
||||
val versionInfo = GradleVersionInfo.fetchCurrent()
|
||||
if (versionInfo.version == gradle.gradleVersion) {
|
||||
doLast {
|
||||
@@ -64,7 +64,7 @@ tasks.addRule("Pattern: compatibilityTest[All|Releases|Latest|Candidate|Nightly|
|
||||
}
|
||||
// active release candidate (if any)
|
||||
"Candidate" ->
|
||||
task("compatibilityTestCandidate") {
|
||||
tasks.register("compatibilityTestCandidate") {
|
||||
val versionInfo = GradleVersionInfo.fetchRc()
|
||||
if (versionInfo?.activeRc == true) {
|
||||
dependsOn(createCompatibilityTestTask(versionInfo))
|
||||
@@ -74,7 +74,7 @@ tasks.addRule("Pattern: compatibilityTest[All|Releases|Latest|Candidate|Nightly|
|
||||
}
|
||||
// latest nightly
|
||||
"Nightly" ->
|
||||
task("compatibilityTestNightly") {
|
||||
tasks.register("compatibilityTestNightly") {
|
||||
val versionInfo = GradleVersionInfo.fetchNightly()
|
||||
dependsOn(createCompatibilityTestTask(versionInfo))
|
||||
}
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
|
||||
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
2
gradlew
vendored
2
gradlew
vendored
@@ -205,7 +205,7 @@ fi
|
||||
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,
|
||||
# * DEFAULT_JVM_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.
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.OutputStream
|
||||
import org.gradle.kotlin.dsl.support.serviceOf
|
||||
|
||||
plugins {
|
||||
@@ -148,6 +149,7 @@ private fun setupJavaExecutableRun(
|
||||
null -> "java"
|
||||
else -> launcher.get().executablePath.asFile.absolutePath
|
||||
}
|
||||
standardOutput = OutputStream.nullOutputStream()
|
||||
|
||||
args("-jar", javaExecutable.get().outputs.files.singleFile.toString(), *args)
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import java.io.OutputStream
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.util.*
|
||||
import kotlin.io.path.createDirectories
|
||||
@@ -77,6 +78,7 @@ private fun Exec.configureTestStartFatJar(launcher: Provider<JavaLauncher>) {
|
||||
|
||||
inputs.files(tasks.shadowJar)
|
||||
executable = launcher.get().executablePath.asFile.absolutePath
|
||||
standardOutput = OutputStream.nullOutputStream()
|
||||
|
||||
argumentProviders.add(
|
||||
CommandLineArgumentProvider {
|
||||
|
||||
Reference in New Issue
Block a user