mirror of
https://github.com/apple/pkl.git
synced 2026-07-13 00:22:48 +02:00
Revert configuration cache (#1659)
This reverts the commits that enabled Gradle's configuration cache feature. IMO: this feature is too hard to use. We don't know if a task is valid for the configuration cache until it runs, and it's very hard to tell if something is safe when authoring Gradle code. For example, our publish tasks are currently failing; I don't know how I would fix this without running the publish task again on my dev machine. Also, some of our build scripts become more brittle because of this; for example, see https://github.com/apple/pkl/blob/bb07589eae0b3195a589559a3245cbc12c29b394/build-logic/src/main/kotlin/BuildInfo.kt#L291-L296
This commit is contained in:
+19
-39
@@ -53,47 +53,27 @@ idea {
|
||||
}
|
||||
}
|
||||
|
||||
val clean by tasks.existing {
|
||||
val buildDirectory = layout.buildDirectory.map { it.asFile }
|
||||
doLast { buildDirectory.get().delete() }
|
||||
}
|
||||
val clean by tasks.existing { delete(layout.buildDirectory) }
|
||||
|
||||
val printVersion by tasks.registering {
|
||||
val pklVersion = buildInfo.pklVersion
|
||||
doFirst { println(pklVersion.get()) }
|
||||
}
|
||||
val printVersion by tasks.registering { doFirst { println(buildInfo.pklVersion) } }
|
||||
|
||||
val printInfo by tasks.registering {
|
||||
val arch = buildInfo.arch
|
||||
val pklVersion = buildInfo.pklVersion
|
||||
val pklVersionNonUnique = buildInfo.pklVersionNonUnique
|
||||
val commitId = buildInfo.commitId
|
||||
val gradleVerison = gradle.gradleVersion
|
||||
val javaVersion = System.getProperty("java.version")
|
||||
val isParallel = gradle.startParameter.isParallelProjectExecutionEnabled
|
||||
val maxWorkerCount = gradle.startParameter.maxWorkerCount
|
||||
val projectVersion = project.version
|
||||
doFirst {
|
||||
val message =
|
||||
"""
|
||||
====
|
||||
Gradle version : $gradleVerison
|
||||
Java version : $javaVersion
|
||||
isParallel : $isParallel
|
||||
maxWorkerCount : $maxWorkerCount
|
||||
Architecture : $arch
|
||||
val message =
|
||||
"""
|
||||
====
|
||||
Gradle version : ${gradle.gradleVersion}
|
||||
Java version : ${System.getProperty("java.version")}
|
||||
isParallel : ${gradle.startParameter.isParallelProjectExecutionEnabled}
|
||||
maxWorkerCount : ${gradle.startParameter.maxWorkerCount}
|
||||
Architecture : ${buildInfo.arch}
|
||||
|
||||
Project Version : $projectVersion
|
||||
Pkl Version : ${pklVersion.get()}
|
||||
Pkl Non-Unique Version : $pklVersionNonUnique
|
||||
Git Commit ID : ${commitId.get()}
|
||||
====
|
||||
"""
|
||||
.trimIndent()
|
||||
Project Version : ${project.version}
|
||||
Pkl Version : ${buildInfo.pklVersion}
|
||||
Pkl Non-Unique Version : ${buildInfo.pklVersionNonUnique}
|
||||
Git Commit ID : ${buildInfo.commitId}
|
||||
====
|
||||
"""
|
||||
|
||||
val formattedMessage =
|
||||
message.replace("====", "=".repeat(message.lines().maxByOrNull { it.length }!!.length))
|
||||
val formattedMessage =
|
||||
message.replace("\n====", "\n" + "=".repeat(message.lines().maxByOrNull { it.length }!!.length))
|
||||
|
||||
println(formattedMessage)
|
||||
}
|
||||
}
|
||||
logger.info(formattedMessage)
|
||||
|
||||
Reference in New Issue
Block a user