[Gradle, JS] Fix typo and add node js module configurator

^KT-40527 fixed
This commit is contained in:
Ilya Goncharov
2020-07-21 14:19:38 +03:00
parent 0d606e1346
commit 01ec8b5262
4 changed files with 11 additions and 8 deletions
@@ -18,7 +18,7 @@ import javax.swing.Icon
class CreateModuleOrTargetPopup private constructor(
private val target: Module?,
private val allowMultiplatform: Boolean,
private val allowSinglepaltformJs: Boolean,
private val allowSinglePlatformJs: Boolean,
private val allowAndroid: Boolean,
private val allowIos: Boolean,
private val createTarget: (TargetConfigurator) -> Unit,
@@ -42,7 +42,10 @@ class CreateModuleOrTargetPopup private constructor(
if (allowMultiplatform) +MppModuleConfigurator
+JvmSinglePlatformModuleConfigurator
if (allowAndroid) +AndroidSinglePlatformModuleConfigurator
if (allowSinglepaltformJs) +BrowserJsSinglePlatformModuleConfigurator
if (allowSinglePlatformJs) {
+BrowserJsSinglePlatformModuleConfigurator
+NodeJsSinglePlatformModuleConfigurator
}
if (allowIos) +IOSSinglePlatformModuleConfigurator
}
) {
@@ -105,7 +108,7 @@ class CreateModuleOrTargetPopup private constructor(
fun create(
target: Module?,
allowMultiplatform: Boolean,
allowSinglepaltformJs: Boolean,
allowSinglePlatformJs: Boolean,
allowAndroid: Boolean,
allowIos: Boolean,
createTarget: (TargetConfigurator) -> Unit,
@@ -113,7 +116,7 @@ class CreateModuleOrTargetPopup private constructor(
) = CreateModuleOrTargetPopup(
target = target,
allowMultiplatform = allowMultiplatform,
allowSinglepaltformJs = allowSinglepaltformJs,
allowSinglePlatformJs = allowSinglePlatformJs,
allowAndroid = allowAndroid,
allowIos = allowIos,
createTarget = createTarget,
@@ -37,7 +37,7 @@ class ModulesEditorComponent(
moduleCreator.create(
target = null, // The empty tree case
allowMultiplatform = isMppProject,
allowSinglepaltformJs = isMppProject,
allowSinglePlatformJs = isMppProject,
allowAndroid = isMppProject,
allowIos = isMppProject,
allModules = value ?: emptyList(),
@@ -36,7 +36,7 @@ class ModulesEditorToolbarDecorator(
allowMultiplatform = isMultiplatformProject()
&& isRootModule
&& allModules.none { it.configurator == MppModuleConfigurator },
allowSinglepaltformJs = isMultiplatformProject()
allowSinglePlatformJs = isMultiplatformProject()
&& isRootModule
&& allModules.none { it.configurator == BrowserJsSinglePlatformModuleConfigurator },
allowAndroid = isRootModule
@@ -35,7 +35,7 @@ class NewModuleCreator {
fun create(
target: Module?,
allowMultiplatform: Boolean,
allowSinglepaltformJs: Boolean,
allowSinglePlatformJs: Boolean,
allowAndroid: Boolean,
allowIos: Boolean,
allModules: List<Module>,
@@ -43,7 +43,7 @@ class NewModuleCreator {
) = CreateModuleOrTargetPopup.create(
target = target,
allowMultiplatform = allowMultiplatform,
allowSinglepaltformJs = allowSinglepaltformJs,
allowSinglePlatformJs = allowSinglePlatformJs,
allowAndroid = allowAndroid,
allowIos = allowIos,
createTarget = { targetConfigurator ->