Skip to content

Commit aedf060

Browse files
committed
Version 0.2.7
1 parent 1c08597 commit aedf060

File tree

10 files changed

+92
-160
lines changed

10 files changed

+92
-160
lines changed

build.gradle

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,29 @@ version = VERSION_NAME
3737

3838
kotlin {
3939
targets {
40-
fromPreset(presets.jvm, 'jvm')
40+
// macosX64("nativeCommon")
41+
jvm()
42+
js()
43+
macosX64()
44+
iosArm32()
45+
iosArm64()
46+
iosX64()
47+
linuxX64()
48+
linuxArm32Hfp()
49+
linuxMips32()
50+
// androidNativeArm32()
51+
// androidNativeArm64()
52+
mingwX64()
53+
54+
// fromPreset(presets.jvm, 'jvm')
4155

4256
// fromPreset(presets.macosX64, 'nativeCommon')
4357

44-
fromPreset(presets.macosX64, 'macos')
45-
fromPreset(presets.iosX64, 'iosX64')
46-
fromPreset(presets.iosArm64, 'iosArm64')
47-
fromPreset(presets.iosArm32, 'iosArm32')
48-
fromPreset(presets.mingwX64, 'mingw')
58+
// fromPreset(presets.macosX64, 'macos')
59+
// fromPreset(presets.iosX64, 'iosX64')
60+
// fromPreset(presets.iosArm64, 'iosArm64')
61+
// fromPreset(presets.iosArm32, 'iosArm32')
62+
// fromPreset(presets.mingwX64, 'mingw')
4963
}
5064
sourceSets {
5165
commonMain {
@@ -71,15 +85,37 @@ kotlin {
7185
}
7286
}
7387

88+
//Disabling js till we sort out some testing
89+
jsMain {
90+
dependsOn commonMain
91+
dependencies {
92+
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
93+
}
94+
}
95+
jsTest {
96+
dependsOn commonTest
97+
dependencies {
98+
implementation 'org.jetbrains.kotlin:kotlin-test-js'
99+
}
100+
}
101+
74102
nativeCommonMain { }
75103
nativeCommonTest { }
76104

77-
configure([iosX64Main, iosArm64Main, macosMain, iosArm32Main, mingwMain]) {
78-
dependsOn nativeCommonMain
79-
}
80-
81-
configure([iosX64Test, iosArm64Test, macosTest, iosArm32Test, mingwTest]) {
82-
dependsOn nativeCommonTest
105+
configure([targets.iosX64,
106+
targets.iosArm32,
107+
targets.iosArm64,
108+
targets.macosX64,
109+
targets.mingwX64,
110+
targets.linuxX64,
111+
targets.linuxArm32Hfp,
112+
targets.linuxMips32
113+
// ,
114+
// targets.androidNativeArm32,
115+
// targets.androidNativeArm64
116+
]) {
117+
compilations.main.source(sourceSets.nativeCommonMain)
118+
compilations.test.source(sourceSets.nativeCommonTest)
83119
}
84120
}
85121
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
kotlin.code.style=official
1818

1919
GROUP=co.touchlab
20-
VERSION_NAME=0.2.4
20+
VERSION_NAME=0.2.7
2121

22-
KOTLIN_VERSION=1.3.40
22+
KOTLIN_VERSION=1.3.50
2323

2424
POM_URL=https://github.com/touchlab/TestHelp
2525
POM_DESCRIPTION=Kotlin Multiplatform Test Help

src/commonMain/kotlin/co/touchlab/testhelp/Functions.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ package co.touchlab.testhelp
22

33
expect fun Throwable.printStackTrace()
44

5-
expect fun <T> T.freeze(): T
5+
expect fun <T> T.freeze(): T
6+
7+
expect val multithreaded:Boolean

src/commonMain/kotlin/co/touchlab/testhelp/karmok/MockRecorder.kt

Lines changed: 0 additions & 98 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package co.touchlab.testhelp
2+
3+
4+
actual fun Throwable.printStackTrace(){
5+
6+
}
7+
8+
actual fun <T> T.freeze(): T = this
9+
actual val multithreaded: Boolean = false
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package co.touchlab.testhelp.concurrency
2+
3+
import kotlin.js.Date
4+
5+
actual class MPWorker actual constructor(){
6+
7+
actual fun <T> runBackground(backJob: () -> T): MPFuture<T> {
8+
return MPFuture()
9+
}
10+
11+
actual fun requestTermination() {
12+
13+
}
14+
}
15+
16+
actual class MPFuture<T>() {
17+
actual fun consume():T{
18+
throw Throwable()
19+
}
20+
}
21+
22+
actual fun sleep(time: Long) {
23+
throw Throwable()
24+
}
25+
26+
actual fun currentTimeMillis():Long = Date().getTime().toLong()

src/jvmMain/kotlin/co/touchlab/testhelp/FunctionsJVM.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ actual fun Throwable.printStackTrace(){
44
printStackTrace()
55
}
66

7-
actual fun <T> T.freeze(): T = this
7+
actual fun <T> T.freeze(): T = this
8+
actual val multithreaded: Boolean = true

src/jvmMain/kotlin/co/touchlab/testhelp/karmok/PlatformJVM.kt

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/nativeCommonMain/kotlin/co/touchlab/testhelp/Functions.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ actual fun Throwable.printStackTrace(){
66
printStackTrace()
77
}
88

9-
actual fun <T> T.freeze(): T = this.freeze()
9+
actual fun <T> T.freeze(): T = this.freeze()
10+
actual val multithreaded: Boolean = true

src/nativeCommonMain/kotlin/co/touchlab/testhelp/karmok/Platform.kt

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)