fix: resolve configuration cache issue in processLspResources task
Changed processLspResources from a generic task with doLast block to a proper Copy task. This eliminates Gradle script object references that were incompatible with configuration cache. - Converted to Copy task type - Moved copy logic from doLast to task configuration - Maintains same functionality while being configuration cache compatible
This commit is contained in:
@@ -77,16 +77,12 @@ tasks {
|
|||||||
onlyIfModified(true)
|
onlyIfModified(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val processLspResources by registering {
|
val processLspResources by registering(Copy::class) {
|
||||||
|
|
||||||
dependsOn(downloadTasks)
|
dependsOn(downloadTasks)
|
||||||
inputs.dir(downloadDir)
|
|
||||||
outputs.dir(extractedDir)
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
slintViewerFilenames.forEach { (filename, renamed) ->
|
slintViewerFilenames.forEach { (filename, renamed) ->
|
||||||
val fileTarget = downloadDir.get().file(filename)
|
val fileTarget = downloadDir.get().file(filename)
|
||||||
copy {
|
|
||||||
val fileTree = if (filename.endsWith("zip")) zipTree(fileTarget) else tarTree(fileTarget)
|
val fileTree = if (filename.endsWith("zip")) zipTree(fileTarget) else tarTree(fileTarget)
|
||||||
from(fileTree) {
|
from(fileTree) {
|
||||||
// 匹配压缩包内的 slint-lsp 文件夹及其内容
|
// 匹配压缩包内的 slint-lsp 文件夹及其内容
|
||||||
@@ -97,11 +93,9 @@ tasks {
|
|||||||
}
|
}
|
||||||
includeEmptyDirs = false
|
includeEmptyDirs = false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
into(extractedDir)
|
into(extractedDir)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
prepareSandbox {
|
prepareSandbox {
|
||||||
dependsOn(processLspResources)
|
dependsOn(processLspResources)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user