From aa1756724a3db8b2efbfdb2df6f86087e2aad61e Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 1 Mar 2021 22:42:15 +0600 Subject: [PATCH] add and web target --- extensions.gradle | 1 + mppJsProject.gradle | 32 +++++++++++ settings.gradle | 3 +- web/build.gradle | 6 +++ web/src/jsMain/resources/index.html | 83 +++++++++++++++++++++++++++++ 5 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 mppJsProject.gradle create mode 100644 web/build.gradle create mode 100644 web/src/jsMain/resources/index.html 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 @@ + + + + + Kotlin Publication Scripts Builder + + + + +
+ +
+
+
+ Project type +
+ +
+ Licenses +
+
+ +
+ +
+ + Project information + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ +
+
+ +
+
+ + Developers info +
+ +
+ + Repositories info +
+ +
+
+
+ + + + + \ No newline at end of file