Skip to content
This repository was archived by the owner on Jun 6, 2019. It is now read-only.

Commit 23081b3

Browse files
committed
Updates for non-experiemental coroutines
1 parent 67e1905 commit 23081b3

File tree

3 files changed

+31
-21
lines changed

3 files changed

+31
-21
lines changed

README.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Kotlin Coroutine (Experimental) Adapter
2-
=======================================
1+
Kotlin Coroutine Adapter
2+
========================
33

44
A Retrofit 2 `CallAdapter.Factory` for [Kotlin coroutine's][1] `Deferred`.
55

@@ -32,15 +32,29 @@ interface MyService {
3232
Download
3333
--------
3434

35-
Download [the latest JAR][2] or grab via [Maven][3]:
35+
If you are using Kotlin 1.3, download [the latest JAR][2] or grab via [Maven][3]:
36+
```xml
37+
<dependency>
38+
<groupId>com.jakewharton.retrofit</groupId>
39+
<artifactId>retrofit2-kotlin-coroutines-adapter</artifactId>
40+
<version>0.9.0</version>
41+
</dependency>
42+
```
43+
or [Gradle][3]:
44+
```groovy
45+
compile 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.0'
46+
```
47+
48+
If you are using Kotlin pre-1.3 and experimental coroutines, download [its latest JAR][4] or grab
49+
via [Maven][5]:
3650
```xml
3751
<dependency>
3852
<groupId>com.jakewharton.retrofit</groupId>
3953
<artifactId>retrofit2-kotlin-coroutines-experimental-adapter</artifactId>
4054
<version>1.0.0</version>
4155
</dependency>
4256
```
43-
or [Gradle][3]:
57+
or [Gradle][5]:
4458
```groovy
4559
compile 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-experimental-adapter:1.0.0'
4660
```
@@ -69,6 +83,8 @@ License
6983

7084

7185
[1]: https://kotlinlang.org/docs/reference/coroutines.html
72-
[2]: https://search.maven.org/remote_content?g=com.jakewharton.retrofit&a=retrofit2-kotlin-coroutines-experimental-adapter&v=LATEST
73-
[3]: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.jakewharton.retrofit%22%20a%3A%22retrofit2-kotlin-coroutines-experimental-adapter%22
86+
[2]: https://search.maven.org/remote_content?g=com.jakewharton.retrofit&a=retrofit2-kotlin-coroutines-adapter&v=LATEST
87+
[3]: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.jakewharton.retrofit%22%20a%3A%22retrofit2-kotlin-coroutines-adapter%22
88+
[4]: https://search.maven.org/remote_content?g=com.jakewharton.retrofit&a=retrofit2-kotlin-coroutines-experimental-adapter&v=LATEST
89+
[5]: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.jakewharton.retrofit%22%20a%3A%22retrofit2-kotlin-coroutines-experimental-adapter%22
7490
[snap]: https://oss.sonatype.org/content/repositories/snapshots/

build.gradle

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
repositories {
33
mavenCentral()
4-
maven { url "http://dl.bintray.com/kotlin/kotlin-eap"}
4+
maven { url 'http://dl.bintray.com/kotlin/kotlin-eap' }
55
}
66
dependencies {
77
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3-M1'
@@ -17,22 +17,16 @@ sourceCompatibility = JavaVersion.VERSION_1_6
1717

1818
repositories {
1919
mavenCentral()
20-
maven { url "http://dl.bintray.com/kotlin/kotlin-eap"}
20+
maven { url 'http://dl.bintray.com/kotlin/kotlin-eap' }
2121
}
2222

2323
dependencies {
24-
api 'com.squareup.retrofit2:retrofit:2.3.0'
25-
api 'org.jetbrains.kotlin:kotlin-stdlib:1.2.10'
24+
api 'com.squareup.retrofit2:retrofit:2.4.0'
25+
api 'org.jetbrains.kotlin:kotlin-stdlib:1.3-M1'
2626
api 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.24.0-eap13'
2727

2828
testImplementation 'junit:junit:4.12'
29-
testImplementation 'com.squareup.okhttp3:mockwebserver:3.9.1'
30-
testImplementation 'com.google.guava:guava:23.6-jre'
31-
testImplementation 'com.google.truth:truth:0.37'
32-
}
33-
34-
kotlin {
35-
experimental {
36-
coroutines 'enable'
37-
}
29+
testImplementation 'com.squareup.okhttp3:mockwebserver:3.11.0'
30+
testImplementation 'com.google.guava:guava:26.0-jre'
31+
testImplementation 'com.google.truth:truth:0.42'
3832
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
GROUP=com.jakewharton.retrofit
2-
VERSION_NAME=1.0.1-SNAPSHOT
2+
VERSION_NAME=0.9.0-SNAPSHOT
33

44
POM_NAME=Retrofit 2 Kotlin Coroutine Adapter
55
POM_DESCRIPTION=A CallAdapter.Factory for Kotlin coroutine's Deferred.
6-
POM_ARTIFACT_ID=retrofit2-kotlin-coroutines-experimental-adapter
6+
POM_ARTIFACT_ID=retrofit2-kotlin-coroutines-adapter
77
POM_PACKAGING=jar
88
99
POM_URL=https://github.com/JakeWharton/retrofit2-kotlin-coroutines-adapter/

0 commit comments

Comments
 (0)