Skip to content

Commit f583759

Browse files
committed
Version 0.13.0-eap13 with Kotlin 1.3.0-rc-146
1 parent fa118ed commit f583759

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformJvmPlugin
1212
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
1313

1414
plugins {
15-
id("org.jetbrains.kotlin.jvm") version "1.3-M1"
15+
id("org.jetbrains.kotlin.jvm") version "1.3.0-rc-146"
1616
id("com.jfrog.bintray") version "1.8.4"
1717
jacoco
1818
`maven-publish`
@@ -35,7 +35,7 @@ java {
3535

3636
dependencies {
3737
compile("org.jetbrains.kotlin:kotlin-stdlib")
38-
compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:0.24.0-eap13")
38+
compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:0.30.2-eap13")
3939
compile("com.squareup.retrofit2:retrofit:2.4.0")
4040
testCompile("junit:junit:4.12")
4141
}
@@ -78,7 +78,7 @@ val releaseTag = "v${project.version}"
7878
val sourcesJar by tasks.creating(Jar::class) {
7979
dependsOn("classes")
8080
classifier = "sources"
81-
from(sourceSets["main"].allSource)
81+
from(sourceSets["main"].allJava)
8282
}
8383

8484
val javadocJar by tasks.creating(Jar::class) {

src/main/kotlin/ru/gildor/coroutines/retrofit/CallAwait.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public suspend fun <T : Any> Call<T>.await(): T {
3434
return suspendCancellableCoroutine { continuation ->
3535
enqueue(object : Callback<T> {
3636
override fun onResponse(call: Call<T>?, response: Response<T?>) {
37-
continuation.resumeWith(SuccessOrFailure.runCatching {
37+
continuation.resumeWith(runCatching {
3838
if (response.isSuccessful) {
3939
response.body()
4040
?: throw NullPointerException("Response body is null: $response")
@@ -89,7 +89,7 @@ public suspend fun <T : Any> Call<T>.awaitResult(): Result<T> {
8989
return suspendCancellableCoroutine { continuation ->
9090
enqueue(object : Callback<T> {
9191
override fun onResponse(call: Call<T>?, response: Response<T>) {
92-
continuation.resumeWith(SuccessOrFailure.runCatching {
92+
continuation.resumeWith(runCatching {
9393
if (response.isSuccessful) {
9494
val body = response.body()
9595
if (body == null) {

src/test/kotlin/ru/gildor/coroutines/retrofit/CallAwaitTest.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package ru.gildor.coroutines.retrofit
1818

1919
import kotlinx.coroutines.CoroutineScope
20-
import kotlinx.coroutines.Unconfined
20+
import kotlinx.coroutines.Dispatchers
2121
import kotlinx.coroutines.async
2222
import kotlinx.coroutines.runBlocking
2323
import org.junit.Assert.assertEquals
@@ -32,7 +32,6 @@ import retrofit2.HttpException
3232
import ru.gildor.coroutines.retrofit.util.MockedCall
3333
import ru.gildor.coroutines.retrofit.util.NullBodyCall
3434
import ru.gildor.coroutines.retrofit.util.errorResponse
35-
import kotlin.coroutines.coroutineContext
3635

3736
private const val DONE = "Done!"
3837

@@ -296,6 +295,6 @@ class CallAwaitTest {
296295
}
297296

298297
private fun testBlocking(block: suspend CoroutineScope.() -> Unit) {
299-
runBlocking(Unconfined, block)
298+
runBlocking(Dispatchers.Unconfined, block)
300299
}
301300

0 commit comments

Comments
 (0)