Clear jar cache with daemon
This commit is contained in:
@@ -136,6 +136,9 @@ interface CompileService : Remote {
|
||||
operationsTracer: RemoteOperationsTracer?
|
||||
): CallResult<Int>
|
||||
|
||||
@Throws(RemoteException::class)
|
||||
fun clearJarCache()
|
||||
|
||||
@Throws(RemoteException::class)
|
||||
fun leaseReplSession(
|
||||
aliveFlagPath: String?,
|
||||
|
||||
@@ -680,7 +680,7 @@ class CompileServiceImpl(
|
||||
}
|
||||
}
|
||||
|
||||
private fun clearJarCache() {
|
||||
override fun clearJarCache() {
|
||||
ZipHandler.clearFileAccessorCache()
|
||||
(KotlinCoreEnvironment.applicationEnvironment?.jarFileSystem as? CoreJarFileSystem)?.clearHandlersCache()
|
||||
}
|
||||
|
||||
+3
@@ -142,6 +142,9 @@ internal class GradleCompilerRunner(private val project: Project) : KotlinCompil
|
||||
super.compileWithDaemon(compilerClassName, argsArray, environment)
|
||||
}
|
||||
exitCode?.let {
|
||||
withDaemon(environment, retryOnConnectionError = true) { daemon, sessionId ->
|
||||
daemon.clearJarCache()
|
||||
}
|
||||
logFinish(DAEMON_EXECUTION_STRATEGY)
|
||||
}
|
||||
return exitCode
|
||||
|
||||
Reference in New Issue
Block a user