diff --git a/SampleApplications/WebApp/build.gradle b/SampleApplications/WebApp/build.gradle new file mode 100644 index 00000000..0d66ae47 --- /dev/null +++ b/SampleApplications/WebApp/build.gradle @@ -0,0 +1,44 @@ +plugins { + id 'org.jetbrains.kotlin.js' +} + + +repositories { + mavenCentral() + google() +} + + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-js" + + implementation project(":fints4k") + + implementation "org.jetbrains.kotlin-wrappers:kotlin-react:17.0.2-pre.293-kotlin-$kotlinVersion" + implementation "org.jetbrains.kotlin-wrappers:kotlin-react-dom:17.0.2-pre.293-kotlin-$kotlinVersion" + implementation "org.jetbrains.kotlin-wrappers:kotlin-styled:5.3.3-pre.293-kotlin-$kotlinVersion" + + testImplementation "org.jetbrains.kotlin:kotlin-test-js" +} + +kotlin { + js(IR) { + browser { + webpackTask { + cssSupport.enabled = true + } + + runTask { + cssSupport.enabled = true + } + + testTask { + useKarma { + useChromeHeadless() + webpackConfig.cssSupport.enabled = true + } + } + } + binaries.executable() + } +} \ No newline at end of file diff --git a/SampleApplications/WebApp/src/main/kotlin/main.kt b/SampleApplications/WebApp/src/main/kotlin/main.kt new file mode 100644 index 00000000..4542048a --- /dev/null +++ b/SampleApplications/WebApp/src/main/kotlin/main.kt @@ -0,0 +1,5 @@ +import kotlinx.browser.document + +fun main() { + document.write("Hello, world!") +} \ No newline at end of file diff --git a/SampleApplications/WebApp/src/main/resources/index.html b/SampleApplications/WebApp/src/main/resources/index.html new file mode 100644 index 00000000..e4bcb6d0 --- /dev/null +++ b/SampleApplications/WebApp/src/main/resources/index.html @@ -0,0 +1,11 @@ + + + + + fints4k WebApp + + + + + + \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 53ea2e0d..26cc3e30 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ kotlin.code.style=official org.gradle.jvmargs=-Xmx3072m -kotlinVersion=1.6.0 +kotlinVersion=1.6.10 coroutinesVersion=1.6.0 ktorVersion=2.0.0-beta-1 diff --git a/settings.gradle b/settings.gradle index e35f1a51..f855d204 100644 --- a/settings.gradle +++ b/settings.gradle @@ -15,5 +15,11 @@ include ":multiplatform-utils" // Sample applications -include("SampleApplications:AndroidApp") -findProject(":SampleApplications:AndroidApp")?.name = "AndroidApp" +include "AndroidApp" +findProject(":AndroidApp")?.projectDir = file("SampleApplications/AndroidApp") +findProject(":AndroidApp")?.name = "AndroidApp" + +include "WebApp" +findProject(":WebApp")?.projectDir = file("SampleApplications/WebApp") +findProject(":WebApp")?.name = "WebApp" +