Fix serialization of data nodes tree

#KT-33987 Fixed
This commit is contained in:
Andrey Uskov
2019-09-24 16:27:13 +03:00
parent 41f7519244
commit 8ff4a92562
2 changed files with 11 additions and 0 deletions
@@ -39,7 +39,10 @@ class KotlinSourceSetInfo @PropertyMapping("kotlinModule") constructor(val kotli
val platform: KotlinPlatform
get() = actualPlatforms.getSinglePlatform()
@Transient
var defaultCompilerArguments: CommonCompilerArguments? = null
@Transient
var compilerArguments: CommonCompilerArguments? = null
var dependencyClasspath: List<String> = emptyList()
var isTestModule: Boolean = false
@@ -46,6 +46,7 @@ import org.jetbrains.plugins.gradle.service.project.GradleProjectResolverUtil.ge
import org.jetbrains.plugins.gradle.service.project.ProjectResolverContext
import org.jetbrains.plugins.gradle.util.GradleConstants
import java.io.File
import java.lang.reflect.Proxy
import java.util.*
import kotlin.collections.HashMap
@@ -750,6 +751,13 @@ open class KotlinMPPGradleProjectResolver : AbstractProjectResolverExtension() {
resolverCtx: ProjectResolverContext
): KotlinSourceSetInfo? {
if (compilation.platform.isNotSupported()) return null
if (Proxy.isProxyClass(compilation.javaClass)) {
return createSourceSetInfo(
KotlinCompilationImpl(compilation, HashMap<Any, Any>()),
gradleModule,
resolverCtx
)
}
return KotlinSourceSetInfo(compilation).also { sourceSetInfo ->
sourceSetInfo.moduleId = getKotlinModuleId(gradleModule, compilation, resolverCtx)
sourceSetInfo.gradleModuleId = getModuleId(resolverCtx, gradleModule)