This commit is contained in:
InsanusMokrassar 2021-05-01 20:12:06 +06:00
parent 46d6d429bb
commit ceff1eb1ef
4 changed files with 12 additions and 11 deletions

View File

@ -2,6 +2,9 @@ package dev.inmo.kmppscriptbuilder.core.models
import kotlinx.serialization.Serializable
const val defaultProjectName = "\${project.name}"
const val defaultProjectDescription = "\${project.name}"
@Serializable
data class MavenConfig(
val name: String,

View File

@ -2,8 +2,7 @@ package dev.inmo.kmppscriptbuilder.desktop.views
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.runtime.*
import dev.inmo.kmppscriptbuilder.core.models.MavenConfig
import dev.inmo.kmppscriptbuilder.core.models.SonatypeRepository
import dev.inmo.kmppscriptbuilder.core.models.*
import dev.inmo.kmppscriptbuilder.desktop.utils.*
class MavenInfoView : VerticalView("Project information") {
@ -18,8 +17,8 @@ class MavenInfoView : VerticalView("Project information") {
var mavenConfig: MavenConfig
get() = MavenConfig(
projectNameProperty,
projectDescriptionProperty,
projectNameProperty.ifBlank { defaultProjectName },
projectDescriptionProperty.ifBlank { defaultProjectDescription },
projectUrlProperty,
projectVcsUrlProperty,
includeGpgSignProperty,

View File

@ -6,11 +6,11 @@ kotlin.incremental.js=true
android.useAndroidX=true
android.enableJetifier=true
kotlin_version=1.4.31
kotlin_version=1.4.32
kotlin_coroutines_version=1.4.3
kotlin_serialisation_core_version=1.1.0
ktor_version=1.5.2
micro_utils_version=0.4.29
ktor_version=1.5.3
micro_utils_version=0.4.36
compose_version=0.3.2

View File

@ -1,7 +1,6 @@
package dev.inmo.kmppscriptbuilder.web.views
import dev.inmo.kmppscriptbuilder.core.models.MavenConfig
import dev.inmo.kmppscriptbuilder.core.models.SonatypeRepository
import dev.inmo.kmppscriptbuilder.core.models.*
import kotlinx.browser.document
import org.w3c.dom.HTMLElement
import org.w3c.dom.HTMLInputElement
@ -18,8 +17,8 @@ class MavenProjectInfoView : View {
var mavenConfig: MavenConfig
get() = MavenConfig(
nameElement.value,
descriptionElement.value,
nameElement.value.ifBlank { defaultProjectName },
descriptionElement.value.ifBlank { defaultProjectDescription },
urlElement.value,
vcsUrlElement.value,
includeGpgElement.checked,