Avoid using bound class reference

Bound references require kotlin-reflect 1.1.x on runtime.
However old Gradle versions (e.g. 3.4) can leak 1.0.x reflect
into Gradle classloader, so getting bound reference fails on runtime
(in this case the plugin couldn't connect to the daemon).
This commit is contained in:
Alexey Tsvetkov
2018-06-01 01:34:14 +03:00
parent 42350ffb1a
commit 44a845eca9
@@ -339,7 +339,7 @@ internal class GradleCompilerRunner(private val project: Project) : KotlinCompil
private fun logFinish(strategy: String) = log.logFinish(strategy)
override fun getDaemonConnection(environment: GradleCompilerEnvironment): CompileServiceSession? {
synchronized(this::javaClass) {
synchronized(this.javaClass) {
val compilerId = CompilerId.makeCompilerId(environment.compilerFullClasspath)
val clientIsAliveFlagFile = getOrCreateClientFlagFile(project)
val sessionIsAliveFlagFile = getOrCreateSessionFlagFile(project)