@@ -10,6 +10,7 @@ generated by coroutine body containing `yield` suspension points
10
10
11
11
## Examples
12
12
### Async
13
+
13
14
``` kotlin
14
15
import kotlinx.coroutines.async
15
16
import java.util.concurrent.CompletableFuture
@@ -35,6 +36,7 @@ Bear in mind that `async` library actively uses `CompletableFuture` from JDK 8,
35
36
it will not work with earlier versions.
36
37
37
38
### Generate
39
+
38
40
``` kotlin
39
41
import kotlinx.coroutines.generate
40
42
@@ -50,6 +52,7 @@ fun main(args: Array<String>) {
50
52
```
51
53
52
54
### RxJava
55
+
53
56
``` kotlin
54
57
import kotlinx.coroutines.asyncRx
55
58
import retrofit2.Retrofit
@@ -90,9 +93,20 @@ fun main(args: Array<String>) {
90
93
For more examples you can look at ` kotlinx-coroutines-async-example-ui `
91
94
and ` kotlinx-coroutines-rx-example ` samples projects or in tests directories.
92
95
93
- ## Maven
96
+ ## Using in your projects
97
+
98
+ > Note that these libraries are experimental and are subject to change.
99
+
100
+ The libraries are published to [ kotlin-eap-1.1] ( https://bintray.com/kotlin/kotlin-eap-1.1/kotlinx.coroutines ) bintray repository.
101
+
102
+ These libraries require kotlin compiler version to be at least ` 1.1-M04 ` and
103
+ require kotlin runtime of the same version as a dependency, which can be obtained from the same repository.
104
+
94
105
95
- Add the bintray repository
106
+ ### Maven
107
+
108
+ Add the bintray repository to ` <repositories> ` section (and also add ` pluginRepository ` to ` <pluginRepositories> ` ,
109
+ if you're willing to get ` kotlin-maven-plugin ` from there):
96
110
97
111
``` xml
98
112
<repository >
@@ -105,7 +119,7 @@ Add the bintray repository
105
119
</repository >
106
120
```
107
121
108
- Add dependencies:
122
+ Add dependencies (you can add just those of them that you need) :
109
123
110
124
``` xml
111
125
<dependency >
@@ -125,9 +139,19 @@ Add dependencies:
125
139
</dependency >
126
140
```
127
141
128
- ## Gradle
142
+ ### Gradle
129
143
130
- Just add dependencies:
144
+ Add the bintray repository (and also add it to ` buildScript ` section, if you're willing to get ` kotlin-gradle-plugin ` from there):
145
+
146
+ ``` groovy
147
+ repositories {
148
+ maven {
149
+ url "http://dl.bintray.com/kotlin/kotlin-eap-1.1"
150
+ }
151
+ }
152
+ ```
153
+
154
+ Add dependencies (you can add just those of them that you need):
131
155
132
156
``` groovy
133
157
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-generate:0.2-beta'
@@ -137,12 +161,3 @@ compile 'org.jetbrains.kotlinx:kotlinx-coroutines-rx:0.2-beta'
137
161
138
162
* NB:* As ` async ` library is built upon ` CompletableFuture ` it requires JDK 8 (24 Android API level)
139
163
140
- Also you should include our bintray repository:
141
-
142
- ``` groovy
143
- repositories {
144
- maven {
145
- url "http://dl.bintray.com/kotlin/kotlin-eap-1.1"
146
- }
147
- }
148
- ```
0 commit comments