Version 1.2.2

Kotlin updated to 1.3.40.
diff --git a/CHANGES.md b/CHANGES.md
index 61aabfe..20cba05 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,9 @@
 # Change log for kotlinx.coroutines
 
+## Version 1.2.2
+
+* Kotlin updated to 1.3.40.
+
 ## Version 1.2.1
 
 Major:
diff --git a/README.md b/README.md
index 2a0f1f3..a618126 100644
--- a/README.md
+++ b/README.md
@@ -2,10 +2,10 @@
 
 [![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
 [![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
-[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.2.1) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.2.1)
+[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.2.2) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.2.2)
 
 Library support for Kotlin coroutines with [multiplatform](#multiplatform) support.
-This is a companion version for Kotlin `1.3.30` release.
+This is a companion version for Kotlin `1.3.40` release.
 
 ```kotlin
 suspend fun main() = coroutineScope {
@@ -81,7 +81,7 @@
 <dependency>
     <groupId>org.jetbrains.kotlinx</groupId>
     <artifactId>kotlinx-coroutines-core</artifactId>
-    <version>1.2.1</version>
+    <version>1.2.2</version>
 </dependency>
 ```
 
@@ -89,7 +89,7 @@
 
 ```xml
 <properties>
-    <kotlin.version>1.3.30</kotlin.version>
+    <kotlin.version>1.3.40</kotlin.version>
 </properties>
 ```
 
@@ -99,7 +99,7 @@
 
 ```groovy
 dependencies {
-    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1'
+    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.2'
 }
 ```
 
@@ -107,7 +107,7 @@
 
 ```groovy
 buildscript {
-    ext.kotlin_version = '1.3.30'
+    ext.kotlin_version = '1.3.40'
 }
 ```
 
@@ -125,7 +125,7 @@
 
 ```groovy
 dependencies {
-    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1")
+    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.2")
 }
 ```
 
@@ -133,7 +133,7 @@
 
 ```groovy
 plugins {
-    kotlin("jvm") version "1.3.30"
+    kotlin("jvm") version "1.3.40"
 }
 ```
 
@@ -144,7 +144,7 @@
 Core modules of `kotlinx.coroutines` are also available for 
 [Kotlin/JS](#js) and [Kotlin/Native](#native).
 In common code that should get compiled for different platforms, add dependency to  
-[`kotlinx-coroutines-core-common`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/1.2.1/jar)
+[`kotlinx-coroutines-core-common`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/1.2.2/jar)
 (follow the link to get the dependency declaration snippet).
 
 ### Android
@@ -153,7 +153,7 @@
 module as dependency when using `kotlinx.coroutines` on Android:
 
 ```groovy
-implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.1'
+implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.2'
 ```
 
 This gives you access to Android [Dispatchers.Main](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-android/kotlinx.coroutines.android/kotlinx.coroutines.-dispatchers/index.html)
@@ -172,7 +172,7 @@
 ### JS
 
 [Kotlin/JS](https://kotlinlang.org/docs/reference/js-overview.html) version of `kotlinx.coroutines` is published as 
-[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.2.1/jar)
+[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.2.2/jar)
 (follow the link to get the dependency declaration snippet).
  
 You can also use [`kotlinx-coroutines-core`](https://www.npmjs.com/package/kotlinx-coroutines-core) package via NPM. 
@@ -180,7 +180,7 @@
 ### Native
 
 [Kotlin/Native](https://kotlinlang.org/docs/reference/native-overview.html) version of `kotlinx.coroutines` is published as 
-[`kotlinx-coroutines-core-native`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-native/1.2.1/jar)
+[`kotlinx-coroutines-core-native`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-native/1.2.2/jar)
 (follow the link to get the dependency declaration snippet).
 
 Only single-threaded code (JS-style) on Kotlin/Native is currently supported. 
diff --git a/gradle.properties b/gradle.properties
index eae784b..77bd4c3 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,11 +1,11 @@
 # Kotlin
-version=1.2.1-1.3.40-eap-67-SNAPSHOT
+version=1.2.2-SNAPSHOT
 group=org.jetbrains.kotlinx
-kotlin_version=1.3.40-eap-67
+kotlin_version=1.3.40
 
 # Dependencies
 junit_version=4.12
-atomicfu_version=0.12.7-1.3.40-eap-67
+atomicfu_version=0.12.9
 html_version=0.6.8
 lincheck_version=2.0
 dokka_version=0.9.16-rdev-2-mpp-hacks
diff --git a/kotlinx-coroutines-debug/README.md b/kotlinx-coroutines-debug/README.md
index e3fdcf5..2ba5ee1 100644
--- a/kotlinx-coroutines-debug/README.md
+++ b/kotlinx-coroutines-debug/README.md
@@ -18,7 +18,7 @@
 Add `kotlinx-coroutines-debug` to your project test dependencies:
 ```
 dependencies {
-    testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.2.1'
+    testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.2.2'
 }
 ```
 
@@ -57,7 +57,7 @@
 ### Using as JVM agent
 
 It is possible to use this module as a standalone JVM agent to enable debug probes on the application startup.
-You can run your application with an additional argument: `-javaagent:kotlinx-coroutines-debug-1.2.1.jar`.
+You can run your application with an additional argument: `-javaagent:kotlinx-coroutines-debug-1.2.2.jar`.
 Additionally, on Linux and Mac OS X you can use `kill -5 $pid` command in order to force your application to print all alive coroutines.
 
 
diff --git a/kotlinx-coroutines-test/README.md b/kotlinx-coroutines-test/README.md
index 5df6b6d..ce7d983 100644
--- a/kotlinx-coroutines-test/README.md
+++ b/kotlinx-coroutines-test/README.md
@@ -9,7 +9,7 @@
 Add `kotlinx-coroutines-test` to your project test dependencies:
 ```
 dependencies {
-    testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.1'
+    testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.2'
 }
 ```
 
diff --git a/ui/coroutines-guide-ui.md b/ui/coroutines-guide-ui.md
index 26144fa..4183d92 100644
--- a/ui/coroutines-guide-ui.md
+++ b/ui/coroutines-guide-ui.md
@@ -165,7 +165,7 @@
 `app/build.gradle` file:
 
 ```groovy
-implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.1"
+implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.2"
 ```
 
 You can clone [kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) project from GitHub onto your 
diff --git a/ui/kotlinx-coroutines-android/animation-app/gradle.properties b/ui/kotlinx-coroutines-android/animation-app/gradle.properties
index bd2f170..2010890 100644
--- a/ui/kotlinx-coroutines-android/animation-app/gradle.properties
+++ b/ui/kotlinx-coroutines-android/animation-app/gradle.properties
@@ -18,6 +18,6 @@
 
 kotlin.coroutines=enable
 
-kotlin_version=1.3.30
-coroutines_version=1.2.1
+kotlin_version=1.3.40
+coroutines_version=1.2.2
 
diff --git a/ui/kotlinx-coroutines-android/example-app/gradle.properties b/ui/kotlinx-coroutines-android/example-app/gradle.properties
index bd2f170..2010890 100644
--- a/ui/kotlinx-coroutines-android/example-app/gradle.properties
+++ b/ui/kotlinx-coroutines-android/example-app/gradle.properties
@@ -18,6 +18,6 @@
 
 kotlin.coroutines=enable
 
-kotlin_version=1.3.30
-coroutines_version=1.2.1
+kotlin_version=1.3.40
+coroutines_version=1.2.2