Move gradle testKit cache to the build directory

This commit is contained in:
Vyacheslav Gerasimov
2022-04-05 20:39:44 +03:00
committed by teamcity
parent d9e8f0c180
commit 202347865d
2 changed files with 3 additions and 4 deletions
@@ -95,7 +95,7 @@ val cleanTestKitCacheTask = tasks.register<Delete>("cleanTestKitCache") {
group = "Build"
description = "Deletes temporary Gradle TestKit cache"
delete(project.file(".testKitDir"))
delete(project.buildDir.resolve("testKitCache"))
}
fun Test.includeMppAndAndroid(include: Boolean) = includeTestsWithPattern(include) {
@@ -273,8 +273,7 @@ val daemonsTestsTask = tasks.register<Test>("kgpDaemonTests") {
includeEngines("junit-jupiter")
}
// Disabled cause jna dependency FD is leaking on windows agents
//if (isTeamcityBuild) finalizedBy(cleanTestKitCacheTask)
if (isTeamcityBuild) finalizedBy(cleanTestKitCacheTask)
}
val otherPluginsTestTask = tasks.register<Test>("kgpOtherTests") {
@@ -358,7 +358,7 @@ private fun TestProject.withBuildSummary(
/**
* On changing test kit dir location update related location in 'cleanTestKitCache' task.
*/
private val testKitDir get() = Paths.get(".").resolve(".testKitDir")
private val testKitDir get() = Paths.get(".").resolve("build").resolve("testKitCache")
private val hashAlphabet: List<Char> = ('a'..'z') + ('A'..'Z') + ('0'..'9')
private fun randomHash(length: Int = 15): String {