Thread
#multiplatform
    phisch

    phisch

    1 year ago
    what's the best practice to write tests in a multiplatform 1.4.10 project? i am new to kotlin and gradle and fail to get testing setup
    This is my
    build.gradle.kts
    :
    plugins {
        kotlin("multiplatform") version "1.4.10"
    }
    group = "me.phisch"
    version = "0.1-DEVELOPMENT"
    
    repositories {
        mavenCentral()
    }
    kotlin {
        val hostOs = System.getProperty("os.name")
        val nativeTarget = when {
            hostOs == "Linux" -> linuxX64("native")
            else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
        }
    
        nativeTarget.apply {
            binaries {
                executable {
                    entryPoint = "main"
                }
            }
            compilations.getByName("main") {
                val xcb by cinterops.creating
            }
        }
        sourceSets {
            val nativeMain by getting
            val nativeTest by getting
        }
    }