diff --git a/extensions.gradle b/extensions.gradle index 0c108ed..2e89947 100644 --- a/extensions.gradle +++ b/extensions.gradle @@ -15,6 +15,7 @@ allprojects { mppProjectWithSerializationPresetPath = "${rootProject.projectDir.absolutePath}/mppProjectWithSerialization.gradle" mppJavaProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJavaProject.gradle" + mppJsProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJsProject.gradle" mppAndroidProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppAndroidProject.gradle" defaultAndroidSettingsPresetPath = "${rootProject.projectDir.absolutePath}/defaultAndroidSettings.gradle" diff --git a/mppJsProject.gradle b/mppJsProject.gradle new file mode 100644 index 0000000..9911a72 --- /dev/null +++ b/mppJsProject.gradle @@ -0,0 +1,32 @@ +project.version = "$version" + System.getenv("additional_version") +project.group = "$group" + +// apply from: "$publishGradlePath" + +kotlin { + js (IR) { + browser() + nodejs() + } + + sourceSets { + commonMain { + dependencies { + implementation kotlin('stdlib') + api "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlin_serialisation_core_version" + } + } + commonTest { + dependencies { + implementation kotlin('test-common') + implementation kotlin('test-annotations-common') + } + } + jsTest { + dependencies { + implementation kotlin('test-js') + implementation kotlin('test-junit') + } + } + } +} diff --git a/settings.gradle b/settings.gradle index b1eed1e..29bbdc6 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,7 +9,8 @@ rootProject.name = 'kmppscriptbuilder' String[] includes = [ ":core", - ":desktop" + ":desktop", + ":web" ] diff --git a/web/build.gradle b/web/build.gradle new file mode 100644 index 0000000..00115fe --- /dev/null +++ b/web/build.gradle @@ -0,0 +1,6 @@ +plugins { + id "org.jetbrains.kotlin.multiplatform" + id "org.jetbrains.kotlin.plugin.serialization" +} + +apply from: "$mppJsProjectPresetPath" diff --git a/web/src/jsMain/resources/index.html b/web/src/jsMain/resources/index.html new file mode 100644 index 0000000..520add9 --- /dev/null +++ b/web/src/jsMain/resources/index.html @@ -0,0 +1,83 @@ + + +
+ +