mirror of
https://github.com/apple/pkl.git
synced 2026-04-10 02:43:42 +02:00
Bump Gradle to 9.4.1 (#1502)
This commit is contained in:
@@ -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");
|
||||
* 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.
|
||||
System.getProperty("commitId").let { if (it != null) return@lazy it }
|
||||
// only run command once per build invocation
|
||||
if (project === project.rootProject) {
|
||||
if (project.path == project.rootProject.path) {
|
||||
val process =
|
||||
ProcessBuilder()
|
||||
.command("git", "rev-parse", "--short", "HEAD")
|
||||
|
||||
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=a17ddd85a26b6a7f5ddb71ff8b05fc5104c0202c6e64782429790c933686c806
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
|
||||
distributionSha256Sum=2ab2958f2a1e51120c326cad6f385153bb11ee93b3c216c5fccebfdfbb7ec6cb
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
7
gradlew
vendored
7
gradlew
vendored
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
# Copyright © 2015 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (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.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -114,7 +114,6 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# 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
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
|
||||
3
gradlew.bat
vendored
3
gradlew.bat
vendored
@@ -70,11 +70,10 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@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
|
||||
@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");
|
||||
* 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.provider.Property;
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.api.tasks.Optional;
|
||||
import org.gradle.api.tasks.OutputFile;
|
||||
import org.pkl.cli.CliImportAnalyzer;
|
||||
import org.pkl.cli.CliImportAnalyzerOptions;
|
||||
|
||||
@CacheableTask
|
||||
public abstract class AnalyzeImportsTask extends ModulesTask {
|
||||
@OutputFile
|
||||
@Optional
|
||||
|
||||
@@ -36,11 +36,14 @@ import org.gradle.api.provider.MapProperty;
|
||||
import org.gradle.api.provider.Property;
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.provider.ProviderFactory;
|
||||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.api.tasks.InputFile;
|
||||
import org.gradle.api.tasks.InputFiles;
|
||||
import org.gradle.api.tasks.Internal;
|
||||
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.pkl.commons.cli.CliBaseOptions;
|
||||
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.gradle.utils.PluginUtils;
|
||||
|
||||
@CacheableTask
|
||||
public abstract class BasePklTask extends DefaultTask {
|
||||
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();
|
||||
|
||||
@InputFiles
|
||||
@PathSensitive(PathSensitivity.ABSOLUTE)
|
||||
public abstract ConfigurableFileCollection getModulePath();
|
||||
|
||||
@Internal
|
||||
@@ -79,6 +84,7 @@ public abstract class BasePklTask extends DefaultTask {
|
||||
|
||||
@InputFile
|
||||
@Optional
|
||||
@PathSensitive(PathSensitivity.ABSOLUTE)
|
||||
public Provider<File> getSettingsModuleFile() {
|
||||
return getParsedSettingsModule()
|
||||
.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");
|
||||
* 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.provider.MapProperty;
|
||||
import org.gradle.api.provider.Property;
|
||||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.api.tasks.Optional;
|
||||
import org.gradle.api.tasks.OutputDirectory;
|
||||
|
||||
@CacheableTask
|
||||
public abstract class CodeGenTask extends ModulesTask {
|
||||
@OutputDirectory
|
||||
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");
|
||||
* 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.provider.Property;
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.api.tasks.Internal;
|
||||
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.CliEvaluatorOptions;
|
||||
|
||||
@CacheableTask
|
||||
public abstract class EvalTask extends ModulesTask {
|
||||
|
||||
// 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");
|
||||
* 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 org.gradle.api.provider.Property;
|
||||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.api.tasks.Optional;
|
||||
import org.pkl.codegen.java.CliJavaCodeGenerator;
|
||||
import org.pkl.codegen.java.CliJavaCodeGeneratorOptions;
|
||||
|
||||
@CacheableTask
|
||||
public abstract class JavaCodeGenTask extends CodeGenTask {
|
||||
@Input
|
||||
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");
|
||||
* 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 org.gradle.api.provider.Property;
|
||||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.pkl.codegen.kotlin.CliKotlinCodeGenerator;
|
||||
import org.pkl.codegen.kotlin.CliKotlinCodeGeneratorOptions;
|
||||
|
||||
@CacheableTask
|
||||
public abstract class KotlinCodeGenTask extends CodeGenTask {
|
||||
@Input
|
||||
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.Property;
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.api.tasks.InputFiles;
|
||||
import org.gradle.api.tasks.Internal;
|
||||
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.pkl.commons.cli.CliBaseOptions;
|
||||
import org.pkl.core.evaluatorSettings.Color;
|
||||
import org.pkl.core.util.Pair;
|
||||
import org.pkl.gradle.utils.PluginUtils;
|
||||
|
||||
@CacheableTask
|
||||
public abstract class ModulesTask extends BasePklTask {
|
||||
// We expose the contents of this property as task inputs via the sourceModuleFiles
|
||||
// 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();
|
||||
|
||||
@InputFiles
|
||||
@PathSensitive(PathSensitivity.ABSOLUTE)
|
||||
public abstract ListProperty<File> getTransitiveModules();
|
||||
|
||||
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.
|
||||
@InputFiles
|
||||
@PathSensitive(PathSensitivity.ABSOLUTE)
|
||||
public FileCollection getSourceModuleFiles() {
|
||||
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");
|
||||
* 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.provider.Property;
|
||||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.api.tasks.OutputDirectory;
|
||||
import org.pkl.doc.CliDocGenerator;
|
||||
import org.pkl.doc.CliDocGeneratorOptions;
|
||||
|
||||
@CacheableTask
|
||||
public abstract class PkldocTask extends ModulesTask {
|
||||
@OutputDirectory
|
||||
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");
|
||||
* 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.Optional;
|
||||
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.pkl.cli.CliProjectPackager;
|
||||
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")
|
||||
public abstract class ProjectPackageTask extends BasePklTask {
|
||||
@InputFiles
|
||||
@PathSensitive(PathSensitivity.ABSOLUTE)
|
||||
public abstract ConfigurableFileCollection getProjectDirectories();
|
||||
|
||||
@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");
|
||||
* 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.file.ConfigurableFileCollection;
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.InputFiles;
|
||||
import org.gradle.api.tasks.Internal;
|
||||
import org.gradle.api.tasks.PathSensitive;
|
||||
import org.gradle.api.tasks.PathSensitivity;
|
||||
import org.pkl.cli.CliProjectResolver;
|
||||
|
||||
@CacheableTask
|
||||
public abstract class ProjectResolveTask extends BasePklTask {
|
||||
@Internal
|
||||
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.
|
||||
// Otherwise, these tasks can be considered up to date.
|
||||
@InputFiles
|
||||
@PathSensitive(PathSensitivity.ABSOLUTE)
|
||||
public Provider<List<File>> getProjectPklFiles() {
|
||||
return getProjectDirectories()
|
||||
.getElements()
|
||||
|
||||
@@ -18,12 +18,14 @@ package org.pkl.gradle.task;
|
||||
import java.io.PrintWriter;
|
||||
import org.gradle.api.file.DirectoryProperty;
|
||||
import org.gradle.api.provider.Property;
|
||||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.api.tasks.Optional;
|
||||
import org.gradle.api.tasks.OutputDirectory;
|
||||
import org.pkl.cli.CliTestRunner;
|
||||
import org.pkl.commons.cli.CliTestOptions;
|
||||
|
||||
@CacheableTask
|
||||
public abstract class TestTask extends ModulesTask {
|
||||
@Optional
|
||||
@OutputDirectory
|
||||
|
||||
Reference in New Issue
Block a user