Skip to content

Commit 6d12352

Browse files
authored
Merge pull request #205 from arkivanov/enable-JS-IR
Enable JS IR
2 parents bfe9e75 + 5c1e47b commit 6d12352

File tree

6 files changed

+20
-36
lines changed

6 files changed

+20
-36
lines changed

buildSrc/buildSrc/src/main/kotlin/dependencies/Deps.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ object Deps {
7272

7373
object Badoo {
7474
object Reaktive : Group(name = "com.badoo.reaktive") {
75-
private const val version = "1.1.20"
75+
private const val version = "1.1.21"
7676

7777
object Reaktive : Dependency(group = Badoo.Reaktive, name = "reaktive", version = version)
7878
object ReaktiveAnnotations : Dependency(group = Badoo.Reaktive, name = "reaktive-annotations", version = version)

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
kotlin.code.style=official
22
kotlin.native.disableCompilerDaemon=true
3+
kotlin.js.compiler=both
34
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8
45
org.gradle.parallel=true
56
org.gradle.caching=true
Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
package com.arkivanov.mvikotlin.rx
22

3-
// Expect/actual workaround for https://github.com/arkivanov/MVIKotlin/issues/145
4-
expect fun <T> observer(onComplete: () -> Unit = {}, onNext: (T) -> Unit = {}): Observer<T>
3+
// Not inlined until https://youtrack.jetbrains.com/issue/KT-45866.
4+
// Also check https://github.com/arkivanov/MVIKotlin/issues/145 before making it inlined.
5+
fun <T> observer(onComplete: (() -> Unit)? = null, onNext: ((T) -> Unit)? = null): Observer<T> =
6+
ObserverImpl(onComplete, onNext)
7+
8+
private class ObserverImpl<in T>(
9+
private val onComplete: (() -> Unit)? = null,
10+
private val onNext: ((T) -> Unit)? = null
11+
) : Observer<T> {
12+
override fun onNext(value: T) {
13+
onNext?.invoke(value)
14+
}
15+
16+
override fun onComplete() {
17+
onComplete?.invoke()
18+
}
19+
}

rx/src/jsMain/kotlin/com/arkivanov/mvikotlin/rx/ObserverBuilder.kt

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

rx/src/jvmNativeCommonMain/kotlin/com/arkivanov/mvikotlin/rx/ObserverBuilder.kt

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

sample/todo-app-js/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
kotlin {
6-
js {
6+
js(LEGACY) {
77
useCommonJs()
88
browser()
99
}

0 commit comments

Comments
 (0)