Bump Gradle to 9.4.1 (#1502)

This commit is contained in:
Daniel Chao
2026-04-07 08:32:43 -07:00
committed by GitHub
parent 7dedddcdb1
commit 8b892f9409
16 changed files with 49 additions and 19 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -368,7 +368,7 @@ open class BuildInfo(private val project: Project) {
// allow -DcommitId=abc123 for build environments that don't have git. // allow -DcommitId=abc123 for build environments that don't have git.
System.getProperty("commitId").let { if (it != null) return@lazy it } System.getProperty("commitId").let { if (it != null) return@lazy it }
// only run command once per build invocation // only run command once per build invocation
if (project === project.rootProject) { if (project.path == project.rootProject.path) {
val process = val process =
ProcessBuilder() ProcessBuilder()
.command("git", "rev-parse", "--short", "HEAD") .command("git", "rev-parse", "--short", "HEAD")
Binary file not shown.
+2 -2
View File
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=a17ddd85a26b6a7f5ddb71ff8b05fc5104c0202c6e64782429790c933686c806 distributionSha256Sum=2ab2958f2a1e51120c326cad6f385153bb11ee93b3c216c5fccebfdfbb7ec6cb
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
Vendored
+2 -5
View File
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright © 2015-2021 the original authors. # Copyright © 2015 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;; NONSTOP* ) nonstop=true ;;
esac esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java # For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" ) JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@" "$@"
Vendored
+1 -2
View File
@@ -70,11 +70,10 @@ goto fail
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -19,12 +19,14 @@ import java.io.File;
import org.gradle.api.file.RegularFileProperty; import org.gradle.api.file.RegularFileProperty;
import org.gradle.api.provider.Property; import org.gradle.api.provider.Property;
import org.gradle.api.provider.Provider; import org.gradle.api.provider.Provider;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.OutputFile; import org.gradle.api.tasks.OutputFile;
import org.pkl.cli.CliImportAnalyzer; import org.pkl.cli.CliImportAnalyzer;
import org.pkl.cli.CliImportAnalyzerOptions; import org.pkl.cli.CliImportAnalyzerOptions;
@CacheableTask
public abstract class AnalyzeImportsTask extends ModulesTask { public abstract class AnalyzeImportsTask extends ModulesTask {
@OutputFile @OutputFile
@Optional @Optional
@@ -36,11 +36,14 @@ import org.gradle.api.provider.MapProperty;
import org.gradle.api.provider.Property; import org.gradle.api.provider.Property;
import org.gradle.api.provider.Provider; import org.gradle.api.provider.Provider;
import org.gradle.api.provider.ProviderFactory; import org.gradle.api.provider.ProviderFactory;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.InputFile; import org.gradle.api.tasks.InputFile;
import org.gradle.api.tasks.InputFiles; import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
import org.pkl.commons.cli.CliBaseOptions; import org.pkl.commons.cli.CliBaseOptions;
import org.pkl.core.evaluatorSettings.Color; import org.pkl.core.evaluatorSettings.Color;
@@ -48,6 +51,7 @@ import org.pkl.core.util.LateInit;
import org.pkl.core.util.Nullable; import org.pkl.core.util.Nullable;
import org.pkl.gradle.utils.PluginUtils; import org.pkl.gradle.utils.PluginUtils;
@CacheableTask
public abstract class BasePklTask extends DefaultTask { public abstract class BasePklTask extends DefaultTask {
private static final String TRUFFLE_USE_FALLBACK_RUNTIME_FLAG = "truffle.UseFallbackRuntime"; private static final String TRUFFLE_USE_FALLBACK_RUNTIME_FLAG = "truffle.UseFallbackRuntime";
@@ -67,6 +71,7 @@ public abstract class BasePklTask extends DefaultTask {
public abstract MapProperty<String, String> getExternalProperties(); public abstract MapProperty<String, String> getExternalProperties();
@InputFiles @InputFiles
@PathSensitive(PathSensitivity.ABSOLUTE)
public abstract ConfigurableFileCollection getModulePath(); public abstract ConfigurableFileCollection getModulePath();
@Internal @Internal
@@ -79,6 +84,7 @@ public abstract class BasePklTask extends DefaultTask {
@InputFile @InputFile
@Optional @Optional
@PathSensitive(PathSensitivity.ABSOLUTE)
public Provider<File> getSettingsModuleFile() { public Provider<File> getSettingsModuleFile() {
return getParsedSettingsModule() return getParsedSettingsModule()
.map( .map(
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -18,10 +18,12 @@ package org.pkl.gradle.task;
import org.gradle.api.file.DirectoryProperty; import org.gradle.api.file.DirectoryProperty;
import org.gradle.api.provider.MapProperty; import org.gradle.api.provider.MapProperty;
import org.gradle.api.provider.Property; import org.gradle.api.provider.Property;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.OutputDirectory; import org.gradle.api.tasks.OutputDirectory;
@CacheableTask
public abstract class CodeGenTask extends ModulesTask { public abstract class CodeGenTask extends ModulesTask {
@OutputDirectory @OutputDirectory
public abstract DirectoryProperty getOutputDir(); public abstract DirectoryProperty getOutputDir();
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@ import org.gradle.api.file.FileCollection;
import org.gradle.api.file.RegularFileProperty; import org.gradle.api.file.RegularFileProperty;
import org.gradle.api.provider.Property; import org.gradle.api.provider.Property;
import org.gradle.api.provider.Provider; import org.gradle.api.provider.Provider;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.Optional;
@@ -32,6 +33,7 @@ import org.gradle.api.tasks.OutputFiles;
import org.pkl.cli.CliEvaluator; import org.pkl.cli.CliEvaluator;
import org.pkl.cli.CliEvaluatorOptions; import org.pkl.cli.CliEvaluatorOptions;
@CacheableTask
public abstract class EvalTask extends ModulesTask { public abstract class EvalTask extends ModulesTask {
// not tracked because it might contain placeholders // not tracked because it might contain placeholders
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -17,11 +17,13 @@ package org.pkl.gradle.task;
import java.io.File; import java.io.File;
import org.gradle.api.provider.Property; import org.gradle.api.provider.Property;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.Optional;
import org.pkl.codegen.java.CliJavaCodeGenerator; import org.pkl.codegen.java.CliJavaCodeGenerator;
import org.pkl.codegen.java.CliJavaCodeGeneratorOptions; import org.pkl.codegen.java.CliJavaCodeGeneratorOptions;
@CacheableTask
public abstract class JavaCodeGenTask extends CodeGenTask { public abstract class JavaCodeGenTask extends CodeGenTask {
@Input @Input
public abstract Property<Boolean> getGenerateGetters(); public abstract Property<Boolean> getGenerateGetters();
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -17,10 +17,12 @@ package org.pkl.gradle.task;
import java.io.File; import java.io.File;
import org.gradle.api.provider.Property; import org.gradle.api.provider.Property;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.pkl.codegen.kotlin.CliKotlinCodeGenerator; import org.pkl.codegen.kotlin.CliKotlinCodeGenerator;
import org.pkl.codegen.kotlin.CliKotlinCodeGeneratorOptions; import org.pkl.codegen.kotlin.CliKotlinCodeGeneratorOptions;
@CacheableTask
public abstract class KotlinCodeGenTask extends CodeGenTask { public abstract class KotlinCodeGenTask extends CodeGenTask {
@Input @Input
public abstract Property<Boolean> getGenerateKdoc(); public abstract Property<Boolean> getGenerateKdoc();
@@ -30,16 +30,20 @@ import org.gradle.api.file.FileCollection;
import org.gradle.api.provider.ListProperty; import org.gradle.api.provider.ListProperty;
import org.gradle.api.provider.Property; import org.gradle.api.provider.Property;
import org.gradle.api.provider.Provider; import org.gradle.api.provider.Provider;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.InputFiles; import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
import org.pkl.commons.cli.CliBaseOptions; import org.pkl.commons.cli.CliBaseOptions;
import org.pkl.core.evaluatorSettings.Color; import org.pkl.core.evaluatorSettings.Color;
import org.pkl.core.util.Pair; import org.pkl.core.util.Pair;
import org.pkl.gradle.utils.PluginUtils; import org.pkl.gradle.utils.PluginUtils;
@CacheableTask
public abstract class ModulesTask extends BasePklTask { public abstract class ModulesTask extends BasePklTask {
// We expose the contents of this property as task inputs via the sourceModuleFiles // We expose the contents of this property as task inputs via the sourceModuleFiles
// and sourceModuleUris properties. We cannot use two separate properties because // and sourceModuleUris properties. We cannot use two separate properties because
@@ -49,6 +53,7 @@ public abstract class ModulesTask extends BasePklTask {
public abstract ListProperty<Object> getSourceModules(); public abstract ListProperty<Object> getSourceModules();
@InputFiles @InputFiles
@PathSensitive(PathSensitivity.ABSOLUTE)
public abstract ListProperty<File> getTransitiveModules(); public abstract ListProperty<File> getTransitiveModules();
private final Map<List<Object>, Pair<List<File>, List<URI>>> parsedSourceModulesCache = private final Map<List<Object>, Pair<List<File>, List<URI>>> parsedSourceModulesCache =
@@ -63,6 +68,7 @@ public abstract class ModulesTask extends BasePklTask {
// We use @InputFiles and FileCollection here to ensure that file contents are tracked. // We use @InputFiles and FileCollection here to ensure that file contents are tracked.
@InputFiles @InputFiles
@PathSensitive(PathSensitivity.ABSOLUTE)
public FileCollection getSourceModuleFiles() { public FileCollection getSourceModuleFiles() {
return getProject().files(getParsedSourceModules().map(it -> it.first)); return getProject().files(getParsedSourceModules().map(it -> it.first));
} }
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -17,11 +17,13 @@ package org.pkl.gradle.task;
import org.gradle.api.file.DirectoryProperty; import org.gradle.api.file.DirectoryProperty;
import org.gradle.api.provider.Property; import org.gradle.api.provider.Property;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.OutputDirectory; import org.gradle.api.tasks.OutputDirectory;
import org.pkl.doc.CliDocGenerator; import org.pkl.doc.CliDocGenerator;
import org.pkl.doc.CliDocGeneratorOptions; import org.pkl.doc.CliDocGeneratorOptions;
@CacheableTask
public abstract class PkldocTask extends ModulesTask { public abstract class PkldocTask extends ModulesTask {
@OutputDirectory @OutputDirectory
public abstract DirectoryProperty getOutputDir(); public abstract DirectoryProperty getOutputDir();
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -27,6 +27,8 @@ import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.OutputDirectory; import org.gradle.api.tasks.OutputDirectory;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.UntrackedTask; import org.gradle.api.tasks.UntrackedTask;
import org.pkl.cli.CliProjectPackager; import org.pkl.cli.CliProjectPackager;
import org.pkl.commons.cli.CliTestOptions; import org.pkl.commons.cli.CliTestOptions;
@@ -34,6 +36,7 @@ import org.pkl.commons.cli.CliTestOptions;
@UntrackedTask(because = "Output names are known only after execution") @UntrackedTask(because = "Output names are known only after execution")
public abstract class ProjectPackageTask extends BasePklTask { public abstract class ProjectPackageTask extends BasePklTask {
@InputFiles @InputFiles
@PathSensitive(PathSensitivity.ABSOLUTE)
public abstract ConfigurableFileCollection getProjectDirectories(); public abstract ConfigurableFileCollection getProjectDirectories();
@Internal @Internal
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -23,10 +23,14 @@ import java.util.stream.Collectors;
import org.gradle.api.InvalidUserDataException; import org.gradle.api.InvalidUserDataException;
import org.gradle.api.file.ConfigurableFileCollection; import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.provider.Provider; import org.gradle.api.provider.Provider;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.InputFiles; import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
import org.pkl.cli.CliProjectResolver; import org.pkl.cli.CliProjectResolver;
@CacheableTask
public abstract class ProjectResolveTask extends BasePklTask { public abstract class ProjectResolveTask extends BasePklTask {
@Internal @Internal
public abstract ConfigurableFileCollection getProjectDirectories(); public abstract ConfigurableFileCollection getProjectDirectories();
@@ -34,6 +38,7 @@ public abstract class ProjectResolveTask extends BasePklTask {
// Only the `PklProject` files matter for creating PklProject.deps.json files. // Only the `PklProject` files matter for creating PklProject.deps.json files.
// Otherwise, these tasks can be considered up to date. // Otherwise, these tasks can be considered up to date.
@InputFiles @InputFiles
@PathSensitive(PathSensitivity.ABSOLUTE)
public Provider<List<File>> getProjectPklFiles() { public Provider<List<File>> getProjectPklFiles() {
return getProjectDirectories() return getProjectDirectories()
.getElements() .getElements()
@@ -18,12 +18,14 @@ package org.pkl.gradle.task;
import java.io.PrintWriter; import java.io.PrintWriter;
import org.gradle.api.file.DirectoryProperty; import org.gradle.api.file.DirectoryProperty;
import org.gradle.api.provider.Property; import org.gradle.api.provider.Property;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.OutputDirectory; import org.gradle.api.tasks.OutputDirectory;
import org.pkl.cli.CliTestRunner; import org.pkl.cli.CliTestRunner;
import org.pkl.commons.cli.CliTestOptions; import org.pkl.commons.cli.CliTestOptions;
@CacheableTask
public abstract class TestTask extends ModulesTask { public abstract class TestTask extends ModulesTask {
@Optional @Optional
@OutputDirectory @OutputDirectory