Added test WebApp

This commit is contained in:
dankito 2022-02-16 18:55:15 +01:00
parent 9543a8081d
commit 179b7afbf2
5 changed files with 69 additions and 3 deletions

View File

@ -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()
}
}

View File

@ -0,0 +1,5 @@
import kotlinx.browser.document
fun main() {
document.write("Hello, world!")
}

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>fints4k WebApp</title>
<script src="WebApp.js"></script>
</head>
<body>
</body>
</html>

View File

@ -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

View File

@ -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"