├── .circleci ├── build-container │ ├── Dockerfile │ └── Containerfile └── config.yml ├── .images ├── hello_ios.png ├── hello_jvm.png ├── hello_android.png ├── hello_js_node.png ├── hello_macos.png ├── diagram_simple.png ├── diagram_detailed.png ├── hello_js_browser.png ├── Kotlin Multiplatform diagram simple.xml └── Kotlin Multiplatform diagram.xml ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties └── libs.versions.toml ├── hello_ios_app ├── hello_ios_app │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── iOSApp.swift │ ├── ContentView.swift │ └── Info.plist └── hello_ios_app.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── project.pbxproj ├── hello_shared ├── src │ ├── jvmMain │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ ├── Math.kt │ │ │ ├── console │ │ │ └── Console.kt │ │ │ └── jvm │ │ │ ├── Math.kt │ │ │ └── console │ │ │ └── Console.kt │ ├── androidMain │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ └── console │ │ │ └── AndroidConsole.kt │ ├── commonMain │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ ├── Math.kt │ │ │ ├── IMath.kt │ │ │ ├── console │ │ │ ├── IConsole.kt │ │ │ └── Console.kt │ │ │ └── SharedClass.kt │ ├── jsMain │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ ├── Math.kt │ │ │ └── console │ │ │ └── Console.kt │ ├── nativeMain │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ ├── Math.kt │ │ │ └── console │ │ │ └── Console.kt │ ├── iosMain │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ └── console │ │ │ └── IosConsole.kt │ └── commonTest │ │ └── kotlin │ │ └── SharedClassTest.kt └── build.gradle.kts ├── gradle.properties ├── hello_android_app ├── src │ ├── androidMain │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ └── MainActivity.kt │ └── androidTest │ │ └── kotlin │ │ └── cz │ │ └── sazel │ │ └── hellokotlin │ │ └── ApplicationTest.kt ├── proguard-rules.pro └── build.gradle.kts ├── hello_js_node_app ├── src │ ├── jsMain │ │ ├── resources │ │ │ ├── package.json │ │ │ └── app.js │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ └── main.kt │ └── jsTest │ │ └── kotlin │ │ └── JsNodeJsTest.kt └── build.gradle.kts ├── hello_console_app ├── src │ ├── commonMain │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ └── arch.kt │ ├── linuxX64Main │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ └── arch.kt │ ├── macosX64Main │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ └── arch.kt │ ├── linuxArm64Main │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ └── arch.kt │ ├── macosArm64Main │ │ └── kotlin │ │ │ └── cz │ │ │ └── sazel │ │ │ └── hellokotlin │ │ │ └── arch.kt │ └── nativeMain │ │ └── kotlin │ │ └── cz │ │ └── sazel │ │ └── hellokotlin │ │ └── main.kt └── build.gradle.kts ├── hello_jvm_app ├── src │ ├── jvmTest │ │ └── kotlin │ │ │ └── JvmTest.kt │ └── jvmMain │ │ └── kotlin │ │ └── cz │ │ └── sazel │ │ └── hellokotlin │ │ └── main.kt └── build.gradle.kts ├── hello_js_browser_app ├── src │ ├── jsTest │ │ └── kotlin │ │ │ └── JsBrowserTest.kt │ └── jsMain │ │ ├── resources │ │ └── index.html │ │ └── kotlin │ │ └── cz │ │ └── sazel │ │ └── hellokotlin │ │ ├── console │ │ └── DOMConsole.kt │ │ └── main.kt └── build.gradle.kts ├── settings.gradle.kts ├── .gitignore ├── gradlew.bat ├── gradlew └── README.md /.circleci/build-container/Dockerfile: -------------------------------------------------------------------------------- 1 | Containerfile -------------------------------------------------------------------------------- /.images/hello_ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/.images/hello_ios.png -------------------------------------------------------------------------------- /.images/hello_jvm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/.images/hello_jvm.png -------------------------------------------------------------------------------- /.images/hello_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/.images/hello_android.png -------------------------------------------------------------------------------- /.images/hello_js_node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/.images/hello_js_node.png -------------------------------------------------------------------------------- /.images/hello_macos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/.images/hello_macos.png -------------------------------------------------------------------------------- /.images/diagram_simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/.images/diagram_simple.png -------------------------------------------------------------------------------- /.images/diagram_detailed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/.images/diagram_detailed.png -------------------------------------------------------------------------------- /.images/hello_js_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/.images/hello_js_browser.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /hello_ios_app/hello_ios_app/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } -------------------------------------------------------------------------------- /hello_shared/src/jvmMain/kotlin/cz/sazel/hellokotlin/Math.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | actual typealias Math=cz.sazel.hellokotlin.jvm.Math 4 | -------------------------------------------------------------------------------- /hello_ios_app/hello_ios_app/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | android.defaults.buildfeatures.buildconfig=true 2 | android.nonFinalResIds=false 3 | android.nonTransitiveRClass=false 4 | android.useAndroidX=true 5 | -------------------------------------------------------------------------------- /hello_android_app/src/androidMain/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Hello Kotlin! 3 | Start 4 | 5 | -------------------------------------------------------------------------------- /hello_shared/src/jvmMain/kotlin/cz/sazel/hellokotlin/console/Console.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin.console 2 | 3 | actual typealias Console=cz.sazel.hellokotlin.jvm.console.Console 4 | -------------------------------------------------------------------------------- /hello_js_node_app/src/jsMain/resources/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello_js_node_app", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "kotlin": "~1.2.0-beta-31" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /hello_shared/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /hello_android_app/src/androidMain/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/hello_android_app/src/androidMain/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /hello_android_app/src/androidMain/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/hello_android_app/src/androidMain/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /hello_ios_app/hello_ios_app/iOSApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | @main 4 | struct iOSApp: App { 5 | var body: some Scene { 6 | WindowGroup { 7 | ContentView() 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /hello_android_app/src/androidMain/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/hello_android_app/src/androidMain/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /hello_android_app/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/hello_android_app/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /hello_console_app/src/commonMain/kotlin/cz/sazel/hellokotlin/arch.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | /** 4 | * Gets the architecture of native platform. 5 | */ 6 | expect fun arch(): String 7 | -------------------------------------------------------------------------------- /hello_android_app/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojta/hello-kotlin-multiplatform/HEAD/hello_android_app/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /hello_console_app/src/linuxX64Main/kotlin/cz/sazel/hellokotlin/arch.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | /** 4 | * Gets the architecture of native platform. 5 | */ 6 | actual fun arch(): String = "Linux-x64" 7 | -------------------------------------------------------------------------------- /hello_console_app/src/macosX64Main/kotlin/cz/sazel/hellokotlin/arch.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | /** 4 | * Gets the architecture of native platform. 5 | */ 6 | actual fun arch(): String = "MacOS-x64" 7 | -------------------------------------------------------------------------------- /hello_js_node_app/src/jsMain/resources/app.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | "use strict"; 3 | let hello_js_node_app = require('hello_js_node_app/hello_js_node_app'); 4 | 5 | hello_js_node_app.cz.sazel.hellokotlin.start(); -------------------------------------------------------------------------------- /hello_console_app/src/linuxArm64Main/kotlin/cz/sazel/hellokotlin/arch.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | /** 4 | * Gets the architecture of native platform. 5 | */ 6 | actual fun arch(): String = "Linux-arm64" 7 | -------------------------------------------------------------------------------- /hello_console_app/src/macosArm64Main/kotlin/cz/sazel/hellokotlin/arch.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | /** 4 | * Gets the architecture of native platform. 5 | */ 6 | actual fun arch(): String = "MacOS-arm64" 7 | -------------------------------------------------------------------------------- /hello_ios_app/hello_ios_app.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /hello_ios_app/hello_ios_app/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } -------------------------------------------------------------------------------- /hello_shared/src/commonMain/kotlin/cz/sazel/hellokotlin/Math.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | /** 4 | * Created by vsazel on 22.3.17. 5 | */ 6 | expect class Math : IMath { 7 | 8 | override fun sqrt(x: Double): Double 9 | 10 | } -------------------------------------------------------------------------------- /hello_shared/src/jvmMain/kotlin/cz/sazel/hellokotlin/jvm/Math.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin.jvm 2 | 3 | import cz.sazel.hellokotlin.IMath 4 | 5 | class Math : IMath { 6 | override fun sqrt(x: Double): Double = java.lang.Math.sqrt(x) 7 | } 8 | -------------------------------------------------------------------------------- /hello_shared/src/commonMain/kotlin/cz/sazel/hellokotlin/IMath.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | interface IMath { 4 | /** 5 | * Calculates square root of x. 6 | * @param x argument 7 | */ 8 | fun sqrt(x: Double): Double 9 | } -------------------------------------------------------------------------------- /hello_shared/src/commonMain/kotlin/cz/sazel/hellokotlin/console/IConsole.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin.console 2 | 3 | interface IConsole { 4 | /** 5 | * Prints text to console. 6 | * @param s text to print 7 | */ 8 | fun println(s: String) 9 | } -------------------------------------------------------------------------------- /hello_android_app/src/androidMain/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Oct 31 13:42:43 CET 2025 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /hello_shared/src/jsMain/kotlin/cz/sazel/hellokotlin/Math.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | /** 4 | * Created by vsazel on 22.3.17. 5 | */ 6 | actual class Math : IMath { 7 | 8 | private val mathJs = js("Math") 9 | 10 | actual override fun sqrt(x: Double): Double = mathJs.sqrt(x) 11 | } -------------------------------------------------------------------------------- /hello_shared/src/commonMain/kotlin/cz/sazel/hellokotlin/console/Console.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin.console 2 | 3 | /** 4 | * Console shared code declaration. Class is used to output something on screen. 5 | */ 6 | expect class Console : IConsole { 7 | 8 | override fun println(s: String) 9 | 10 | } -------------------------------------------------------------------------------- /hello_android_app/src/androidMain/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /hello_shared/src/nativeMain/kotlin/cz/sazel/hellokotlin/Math.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | import platform.posix.sqrt as sqrt_ 4 | 5 | /** 6 | * Created by vsazel on 22.3.17. 7 | */ 8 | actual class Math : IMath { 9 | actual override fun sqrt(x: Double): Double = 10 | sqrt_(x) 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /hello_ios_app/hello_ios_app.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /hello_shared/src/nativeMain/kotlin/cz/sazel/hellokotlin/console/Console.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin.console 2 | 3 | /** 4 | * Console shared code declaration. Class is used to output something on screen. 5 | */ 6 | actual class Console : IConsole { 7 | actual override fun println(s: String) { 8 | platform.posix.printf("$s\n") 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /hello_shared/src/jsMain/kotlin/cz/sazel/hellokotlin/console/Console.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin.console 2 | 3 | /** 4 | * Console that logs in JS console object. 5 | */ 6 | actual class Console : IConsole { 7 | 8 | 9 | actual override fun println(s: String) { 10 | //prints text by adding it to the 'console' element 11 | console.log(s) 12 | } 13 | } -------------------------------------------------------------------------------- /hello_jvm_app/src/jvmTest/kotlin/JvmTest.kt: -------------------------------------------------------------------------------- 1 | import java.math.BigInteger 2 | import kotlin.test.Test 3 | import kotlin.test.assertEquals 4 | 5 | class JvmTest { 6 | 7 | @Test 8 | fun jvmTest() { 9 | val a = BigInteger.valueOf(2) 10 | val b = BigInteger.valueOf(3) 11 | val c = a + b 12 | assertEquals(BigInteger.valueOf(5), c) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /hello_js_browser_app/src/jsTest/kotlin/JsBrowserTest.kt: -------------------------------------------------------------------------------- 1 | import kotlinx.browser.document 2 | import kotlin.test.Test 3 | import kotlin.test.assertEquals 4 | 5 | class JsBrowserTest { 6 | 7 | @Test 8 | fun documentTest() { 9 | val expectedData = "Test node" 10 | val node = document.createTextNode(expectedData) 11 | assertEquals(expectedData, node.data) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /hello_shared/src/jvmMain/kotlin/cz/sazel/hellokotlin/jvm/console/Console.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin.jvm.console 2 | 3 | import cz.sazel.hellokotlin.console.IConsole 4 | 5 | /** 6 | * Console for Java console version. 7 | */ 8 | class Console : IConsole { 9 | 10 | override fun println(s: String) { 11 | //just print text to output 12 | System.out.println(s) 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /hello_android_app/src/androidMain/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /hello_jvm_app/src/jvmMain/kotlin/cz/sazel/hellokotlin/main.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | import cz.sazel.hellokotlin.console.Console 4 | import kotlinx.coroutines.runBlocking 5 | 6 | /** 7 | * main function for JVM 8 | */ 9 | fun main(vararg args: String) { 10 | val shared = SharedClass(Console(), Math()) 11 | shared.platform = "JVM" 12 | shared.printMe() 13 | runBlocking { 14 | shared.printPrimes(1000) 15 | } 16 | } -------------------------------------------------------------------------------- /hello_js_browser_app/src/jsMain/resources/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | Kotlin test 8 | 9 | 10 | 11 |

Kotlin Javascript test

12 | 13 |
14 | 
15 | 16 | 17 | -------------------------------------------------------------------------------- /hello_js_browser_app/src/jsMain/kotlin/cz/sazel/hellokotlin/console/DOMConsole.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin.console 2 | 3 | import kotlinx.browser.document 4 | 5 | /** 6 | * Console for web. 7 | */ 8 | class DOMConsole : IConsole { 9 | 10 | 11 | override fun println(s: String) { 12 | //prints text by adding it to the 'console' element 13 | document.getElementById("console")?.appendChild(document.createTextNode("$s\n")) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /hello_console_app/src/nativeMain/kotlin/cz/sazel/hellokotlin/main.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | import cz.sazel.hellokotlin.console.Console 4 | import kotlinx.coroutines.runBlocking 5 | 6 | /** 7 | * main function 8 | */ 9 | fun main() { 10 | val shared = SharedClass(Console(), Math()) 11 | shared.platform = "Native ${arch()}" 12 | shared.printMe() 13 | runBlocking { 14 | shared.printPrimes(1000) 15 | } 16 | } 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /hello_android_app/src/androidMain/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /hello_js_node_app/src/jsTest/kotlin/JsNodeJsTest.kt: -------------------------------------------------------------------------------- 1 | import kotlin.test.Test 2 | import kotlin.test.assertEquals 3 | 4 | class JsNodeJsTest { 5 | 6 | @Test 7 | fun nodeJsTest() { 8 | val crypto = js("require('crypto')") 9 | val sha1 = crypto.createHash("sha1") 10 | sha1.update("foo") 11 | val expectedHash = "0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33" 12 | val actualHash = sha1.digest("hex") 13 | assertEquals(expectedHash, actualHash) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.circleci/build-container/Containerfile: -------------------------------------------------------------------------------- 1 | FROM cimg/android:2025.10.1-node 2 | RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 3 | RUN sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' 4 | RUN sudo apt-get update 5 | RUN sudo apt remove -y "openjdk-21-*" 6 | RUN sudo apt remove -y "openjdk-8-*" 7 | RUN sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java 8 | ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 9 | RUN sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 10 | -------------------------------------------------------------------------------- /hello_js_node_app/src/jsMain/kotlin/cz/sazel/hellokotlin/main.kt: -------------------------------------------------------------------------------- 1 | package cz.sazel.hellokotlin 2 | 3 | import cz.sazel.hellokotlin.console.Console 4 | import kotlinx.coroutines.GlobalScope 5 | import kotlinx.coroutines.launch 6 | 7 | /** 8 | * main function for JavaScript 9 | */ 10 | fun main() { 11 | start() 12 | } 13 | 14 | /** 15 | * We start this function from