-
-
Save RdeWilde/f56f9baf451bb37e2197410c511c0afd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'org.jetbrains.kotlin.multiplatform' version '1.3.41' | |
id "io.kotlintest" version "1.0.2" | |
} | |
repositories { | |
mavenCentral() | |
} | |
group 'com.example' | |
version '0.0.1' | |
apply plugin: 'maven-publish' | |
kotlin { | |
jvm() | |
js { | |
browser { | |
} | |
nodejs { | |
} | |
} | |
// For ARM, should be changed to iosArm32 or iosArm64 | |
// For Linux, should be changed to e.g. linuxX64 | |
// For MacOS, should be changed to e.g. macosX64 | |
// For Windows, should be changed to e.g. mingwX64 | |
linuxX64("linux") | |
sourceSets { | |
commonMain { | |
dependencies { | |
implementation kotlin('stdlib-common') | |
} | |
} | |
commonTest { | |
dependencies { | |
implementation kotlin('test-common') | |
implementation kotlin('test-annotations-common') | |
implementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" | |
} | |
} | |
jvmMain { | |
dependencies { | |
implementation kotlin('stdlib-jdk8') | |
} | |
} | |
jvmTest { | |
dependencies { | |
implementation kotlin('test') | |
implementation kotlin('test-junit') | |
} | |
} | |
jsMain { | |
dependencies { | |
implementation kotlin('stdlib-js') | |
} | |
} | |
jsTest { | |
dependencies { | |
implementation kotlin('test-js') | |
} | |
} | |
linuxMain { | |
} | |
linuxTest { | |
} | |
} | |
} | |
compileKotlinJvm { | |
kotlinOptions { | |
freeCompilerArgs += '-Xuse-experimental=kotlin.Experimental' | |
} | |
} | |
jvmTest { | |
useJUnitPlatform() | |
// show standard out and standard error of the test JVM(s) on the console | |
testLogging.showStandardStreams = true | |
// Always run tests, even when nothing changed. | |
dependsOn 'cleanTest' | |
testLogging { | |
events "FAILED", "SKIPPED", "STANDARD_OUT", "STANDARD_ERROR" | |
exceptionFormat = 'full' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment