mirror of
https://github.com/apple/pkl.git
synced 2026-03-23 01:29:20 +01:00
Enable caching of native image building and test tasks (#409)
Enable caching for the native image building task and improves the caching effectiveness of some of the test tasks in the project.
This commit is contained in:
@@ -138,9 +138,11 @@ fun Exec.configureExecutable(isEnabled: Boolean, outputFile: Provider<RegularFil
|
||||
enabled = isEnabled
|
||||
dependsOn(":installGraalVm")
|
||||
|
||||
inputs.files(sourceSets.main.map { it.output })
|
||||
inputs.files(configurations.runtimeClasspath)
|
||||
inputs.files(sourceSets.main.map { it.output }).withPropertyName("mainSourceSets").withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
inputs.files(configurations.runtimeClasspath).withPropertyName("runtimeClasspath").withNormalizer(ClasspathNormalizer::class)
|
||||
inputs.files(file(buildInfo.graalVm.baseDir).resolve("bin/native-image")).withPropertyName("graalVmNativeImage").withPathSensitivity(PathSensitivity.ABSOLUTE)
|
||||
outputs.file(outputFile)
|
||||
outputs.cacheIf { true }
|
||||
|
||||
workingDir(outputFile.map { it.asFile.parentFile })
|
||||
executable = "${buildInfo.graalVm.baseDir}/bin/native-image"
|
||||
|
||||
Reference in New Issue
Block a user