[Import] Downgrade jvmTarget & move Models and ModelBuilderServices

Fixed KT-35921
Fixed KT-36673
This commit is contained in:
Yaroslav Chernyshev
2020-04-13 19:20:30 +03:00
committed by Yaroslav Chernyshev
parent 385ddba2d9
commit 0b8c497d2e
22 changed files with 373 additions and 315 deletions
@@ -19,6 +19,7 @@ dependencies {
compileOnly(intellijDep())
excludeInAndroidStudio(rootProject) { compileOnly(intellijPluginDep("maven")) }
compileOnly(intellijPluginDep("gradle"))
compileOnly(project(":idea:kotlin-gradle-tooling"))
testRuntime(project(":kotlin-reflect"))
@@ -1 +0,0 @@
org.jetbrains.kotlin.allopen.ide.AllOpenModelBuilderService
@@ -19,27 +19,6 @@ package org.jetbrains.kotlin.allopen.ide
import com.intellij.openapi.util.Key
import org.jetbrains.kotlin.annotation.plugin.ide.*
interface AllOpenModel : AnnotationBasedPluginModel {
override fun dump(): DumpedPluginModel {
return DumpedPluginModelImpl(AllOpenModelImpl::class.java, annotations.toList(), presets.toList())
}
}
class AllOpenModelImpl(
override val annotations: List<String>,
override val presets: List<String>
) : AllOpenModel
class AllOpenModelBuilderService : AnnotationBasedPluginModelBuilderService<AllOpenModel>() {
override val gradlePluginNames get() = listOf("org.jetbrains.kotlin.plugin.allopen", "kotlin-allopen")
override val extensionName get() = "allOpen"
override val modelClass get() = AllOpenModel::class.java
override fun createModel(annotations: List<String>, presets: List<String>, extension: Any?): AllOpenModelImpl {
return AllOpenModelImpl(annotations, presets)
}
}
class AllOpenProjectResolverExtension : AnnotationBasedPluginProjectResolverExtension<AllOpenModel>() {
companion object {
val KEY = Key<AllOpenModel>("AllOpenModel")