Wizard: allow specifying Kotlin target version for JPS build system
#KT-37970 fixed
This commit is contained in:
+3
@@ -1,5 +1,6 @@
|
||||
package org.jetbrains.kotlin.tools.projectWizard.core.service
|
||||
|
||||
import org.jetbrains.kotlin.tools.projectWizard.core.Reader
|
||||
import org.jetbrains.kotlin.tools.projectWizard.core.TaskResult
|
||||
import org.jetbrains.kotlin.tools.projectWizard.core.UNIT_SUCCESS
|
||||
import org.jetbrains.kotlin.tools.projectWizard.ir.buildsystem.ModuleIR
|
||||
@@ -8,6 +9,7 @@ import java.nio.file.Path
|
||||
|
||||
interface ProjectImportingWizardService : BuildSystemWizardService {
|
||||
fun importProject(
|
||||
reader: Reader,
|
||||
path: Path,
|
||||
modulesIrs: List<ModuleIR>,
|
||||
buildSystem: BuildSystemType
|
||||
@@ -17,6 +19,7 @@ interface ProjectImportingWizardService : BuildSystemWizardService {
|
||||
class ProjectImportingWizardServiceImpl : ProjectImportingWizardService, IdeaIndependentWizardService {
|
||||
override fun isSuitableFor(buildSystemType: BuildSystemType): Boolean = true
|
||||
override fun importProject(
|
||||
reader: Reader,
|
||||
path: Path,
|
||||
modulesIrs: List<ModuleIR>,
|
||||
buildSystem: BuildSystemType
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ abstract class BuildSystemPlugin(context: Context) : Plugin(context) {
|
||||
withAction {
|
||||
val data = BuildSystemPlugin::buildSystemData.propertyValue.first { it.type == buildSystemType }
|
||||
service<ProjectImportingWizardService> { service -> service.isSuitableFor(data.type) }
|
||||
.importProject(StructurePlugin::projectPath.reference.settingValue, allIRModules, buildSystemType)
|
||||
.importProject(this, StructurePlugin::projectPath.reference.settingValue, allIRModules, buildSystemType)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user