Bump up versions, use more up to date js testing approach
This commit is contained in:
5 files changed
+82
-73
No files matched your search
@@ -63,6 +63,14 @@ kotlin {
|
||||
println("Destination dir ${it.compileKotlinTask.destinationDir}")
|
||||
}
|
||||
}
|
||||
nodejs()
|
||||
browser() {
|
||||
testTask {
|
||||
useKarma {
|
||||
usePhantomJS()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
linuxX64("linux") {
|
||||
binaries {
|
||||
@@ -101,6 +109,36 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
mingwX64() {
|
||||
binaries {
|
||||
staticLib {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mingwX86() {
|
||||
binaries {
|
||||
staticLib {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linuxArm32Hfp() {
|
||||
binaries {
|
||||
staticLib {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linuxArm64() {
|
||||
binaries {
|
||||
staticLib {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
println(targets.names)
|
||||
|
||||
sourceSets {
|
||||
@@ -116,6 +154,7 @@ kotlin {
|
||||
dependencies {
|
||||
implementation(kotlin(Deps.Common.test))
|
||||
implementation(kotlin(Deps.Common.testAnnotation))
|
||||
implementation(Deps.Common.coroutines)
|
||||
}
|
||||
}
|
||||
val jvmMain by getting {
|
||||
@@ -130,7 +169,6 @@ kotlin {
|
||||
dependencies {
|
||||
implementation(kotlin(Deps.Jvm.test))
|
||||
implementation(kotlin(Deps.Jvm.testJUnit))
|
||||
implementation(Deps.Jvm.oshi)
|
||||
implementation(Deps.Jvm.coroutinesTest)
|
||||
implementation(kotlin(Deps.Jvm.reflection))
|
||||
}
|
||||
@@ -151,7 +189,10 @@ kotlin {
|
||||
dependsOn(commonMain)
|
||||
}
|
||||
val nativeTest by creating {
|
||||
|
||||
dependsOn(commonTest)
|
||||
dependencies {
|
||||
implementation(Deps.Native.coroutines)
|
||||
}
|
||||
}
|
||||
|
||||
val iosMain by getting {
|
||||
@@ -187,6 +228,38 @@ kotlin {
|
||||
val linuxTest by getting {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
|
||||
val mingwX86Main by getting {
|
||||
dependsOn(nativeMain)
|
||||
}
|
||||
|
||||
val mingwX86Test by getting {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
|
||||
val mingwX64Main by getting {
|
||||
dependsOn(nativeMain)
|
||||
}
|
||||
|
||||
val mingwX64Test by getting {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
|
||||
val linuxArm32HfpMain by getting {
|
||||
dependsOn(nativeMain)
|
||||
}
|
||||
|
||||
val linuxArm32HfpTest by getting {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
|
||||
val linuxArm64Main by getting {
|
||||
dependsOn(nativeMain)
|
||||
}
|
||||
|
||||
val linuxArm64Test by getting {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -206,39 +279,6 @@ tasks {
|
||||
val npmInstall by getting
|
||||
val compileKotlinJs by getting(AbstractCompile::class)
|
||||
val compileTestKotlinJs by getting(Kotlin2JsCompile::class)
|
||||
val jsTest by getting
|
||||
|
||||
|
||||
val populateNodeModulesForTests by creating {
|
||||
dependsOn(npmInstall, compileKotlinJs, compileTestKotlinJs)
|
||||
doLast {
|
||||
copy {
|
||||
from(compileKotlinJs.destinationDir)
|
||||
configurations["jsRuntimeClasspath"].forEach {
|
||||
from(zipTree(it.absolutePath).matching { include("*.js") })
|
||||
}
|
||||
configurations["jsTestRuntimeClasspath"].forEach {
|
||||
from(zipTree(it.absolutePath).matching { include("*.js") })
|
||||
}
|
||||
|
||||
into("$projectDir/node_modules")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
val runTestsWithMocha by creating(NodeTask::class) {
|
||||
dependsOn(populateNodeModulesForTests)
|
||||
setScript(file("$projectDir/node_modules/mocha/bin/mocha"))
|
||||
setArgs(listOf(
|
||||
compileTestKotlinJs.outputFile,
|
||||
"--reporter-options",
|
||||
"topLevelSuite=${project.name}-tests"
|
||||
))
|
||||
}
|
||||
|
||||
jsTest.dependsOn("copyPackageJson")
|
||||
jsTest.dependsOn(runTestsWithMocha)
|
||||
|
||||
create<Jar>("javadocJar") {
|
||||
dependsOn(dokka)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"name": "kotlin-multiplatform-crypto-js",
|
||||
"version": "0.0.1",
|
||||
"description": "Kotlin Multiplatform Crypto",
|
||||
"main": "crypto.js",
|
||||
"author": "Ugljesa Jovanovic",
|
||||
"license": "Apache 2.0",
|
||||
"homepage": "",
|
||||
"dependencies": {
|
||||
"kotlin": "1.3.40"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "5.2.0"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user