[build] Fix outputs for the cache task
A klib filename without extension was used to determine a name of a cache directory for this klib. This is incorrect if the klib is stored in a directory with dots in its name. This breaks up-to-date checks, so Gradle doesn't rerun the task if the cache directory was deleted. This patch fixes this issue.
This commit is contained in:
committed by
Ilya Matveev
parent
251cf1220b
commit
83b8240dbb
+3
-1
@@ -34,7 +34,9 @@ open class KonanCacheTask: DefaultTask() {
|
|||||||
@get:OutputDirectory
|
@get:OutputDirectory
|
||||||
protected val cacheFile: File
|
protected val cacheFile: File
|
||||||
get() {
|
get() {
|
||||||
val klibName = originalKlib.nameWithoutExtension
|
val klibName = originalKlib.let {
|
||||||
|
if (it.isDirectory) it.name else it.nameWithoutExtension
|
||||||
|
}
|
||||||
return cacheDirectory.resolve("${klibName}-cache")
|
return cacheDirectory.resolve("${klibName}-cache")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user