mirror of
https://github.com/apple/pkl.git
synced 2026-06-28 08:16:20 +02:00
Enable Gradle configuration cache (#1646)
Enable the configuration cache feature in Gradle, and adjust various pieces of build logic that aren't configuration cache compatible.
This commit is contained in:
@@ -47,8 +47,10 @@ fun Task.setupTestStartJavaExecutable(launcher: Provider<JavaLauncher>? = null)
|
||||
val outputFile = layout.buildDirectory.file("testStartJavaExecutable/$name")
|
||||
outputs.file(outputFile)
|
||||
|
||||
val executableFile = javaExecutable.flatMap { it.outJar }
|
||||
val pklVersion = buildInfo.pklVersionNonUnique
|
||||
val execOutput = providers.exec {
|
||||
val executablePath = javaExecutable.get().outputs.files.singleFile
|
||||
val executablePath = executableFile.get().asFile
|
||||
if (launcher?.isPresent == true) {
|
||||
commandLine(
|
||||
launcher.get().executablePath.asFile.absolutePath,
|
||||
@@ -63,9 +65,9 @@ fun Task.setupTestStartJavaExecutable(launcher: Provider<JavaLauncher>? = null)
|
||||
|
||||
doLast {
|
||||
val outputText = execOutput.standardOutput.asText.get()
|
||||
if (!outputText.contains(buildInfo.pklVersionNonUnique)) {
|
||||
if (!outputText.contains(pklVersion)) {
|
||||
throw GradleException(
|
||||
"Expected version output to contain current version (${buildInfo.pklVersionNonUnique}), but got '$outputText'"
|
||||
"Expected version output to contain current version ($pklVersion), but got '$outputText'"
|
||||
)
|
||||
}
|
||||
outputFile.get().asFile.toPath().apply {
|
||||
|
||||
Reference in New Issue
Block a user