[Gradle] Fix switching in-process to Native embeddable compiler jar

Compiler runner used incorrect cache key for isolated classloader:
it didn't take the actually used compiler jar into account,
only the K/N home dir.

Fix this by using the entire classpath as a key.
This commit is contained in:
Svyatoslav Scherbina
2021-08-28 01:15:52 +03:00
committed by Space
parent 1c052ad448
commit e65f2e465e
2 changed files with 25 additions and 1 deletions
@@ -99,7 +99,10 @@ internal abstract class KotlinNativeToolRunner(
""".trimIndent()
}
final override val isolatedClassLoaderCacheKey get() = project.konanHome
data class IsolatedClassLoaderCacheKey(val classpath: Set<java.io.File>)
// TODO: can't we use this for other implementations too?
final override val isolatedClassLoaderCacheKey get() = IsolatedClassLoaderCacheKey(classpath)
override fun transformArgs(args: List<String>) = listOf(toolName) + args