Skip to content

Commit bc5de38

Browse files
committed
Remove warnings by adding a parameter to the compilation task. Kotlin/kotlinx.coroutines#859
1 parent 33a4051 commit bc5de38

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

app/build.gradle

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ repositories {
33
}
44

55
apply plugin: "com.android.application"
6-
76
apply plugin: "kotlin-android"
8-
97
apply plugin: "kotlin-android-extensions"
108

119
android {
@@ -82,8 +80,6 @@ task ktlintFormat(type: JavaExec, group: "formatting") {
8280
args "-F", "src/**/*.kt"
8381
}
8482

85-
kotlin {
86-
experimental {
87-
coroutines "enable"
88-
}
83+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile).all {
84+
kotlinOptions.freeCompilerArgs += ["-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi"]
8985
}

app/src/main/java/com/karumi/kataloginlogoutkotlin/Presenter.kt

-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
package com.karumi.kataloginlogoutkotlin
22

33
import kotlinx.coroutines.CoroutineScope
4-
import kotlinx.coroutines.ExperimentalCoroutinesApi
54
import kotlinx.coroutines.MainScope
65
import kotlinx.coroutines.cancel
76
import kotlinx.coroutines.launch
87

9-
@ExperimentalCoroutinesApi
108
class Presenter(
119
private val logInLogOutKata: LogInLogOutKata,
1210
private val view: View

0 commit comments

Comments
 (0)