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