Do not retain proxy-based components for compiler plugin settings in project model

This commit is contained in:
Yan Zhulanow
2018-05-16 00:14:19 +03:00
parent 29ef8650f7
commit 20cb4e91b3
4 changed files with 17 additions and 3 deletions
@@ -33,6 +33,8 @@ interface AnnotationBasedPluginModel : Serializable {
val annotations: List<String>
val presets: List<String>
fun copy(): AnnotationBasedPluginModel
val isEnabled get() = annotations.isNotEmpty() || presets.isNotEmpty()
}
@@ -56,7 +58,7 @@ abstract class AnnotationBasedPluginProjectResolverExtension<T : AnnotationBased
val model = resolverCtx.getExtraProject(gradleModule, modelClass)
if (model != null) {
ideModule.putCopyableUserData(userDataKey, model)
ideModule.putCopyableUserData(userDataKey, model.copy() as T)
}
super.populateModuleExtraModels(gradleModule, ideModule)