Skip to content

Commit

Permalink
Upgrade the coffee app and move coroutines to the released, non-exper…
Browse files Browse the repository at this point in the history
…iemntal versions. Regenerate the deps.
  • Loading branch information
cgruber committed Jun 13, 2019
1 parent b6d5602 commit 481fe1c
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 30 deletions.
2 changes: 1 addition & 1 deletion examples/dagger/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ kt_jvm_library(
],
deps = [
":dagger_lib",
"//third_party:kotlinx_coroutines",
"//third_party/jvm/org/jetbrains/kotlinx:kotlinx_coroutines_core",
],
)

Expand Down
4 changes: 2 additions & 2 deletions examples/dagger/src/coffee/CoffeeApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package coffee

import dagger.Component
import kotlinx.coroutines.experimental.runBlocking
import kotlinx.coroutines.runBlocking
import javax.inject.Singleton
import tea.TeaPot

Expand All @@ -30,7 +30,7 @@ class CoffeeApp {
companion object {
@JvmStatic
fun main(args: Array<String>) {
if(TeaPot.isEmpty()) {
if (TeaPot.isEmpty()) {
val coffeeShop = DaggerCoffeeApp_CoffeeShop.builder().build()
runBlocking {
coffeeShop.maker().brew()
Expand Down
6 changes: 3 additions & 3 deletions examples/dagger/src/coffee/CoffeeMaker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
package coffee

import dagger.Lazy
import kotlinx.coroutines.experimental.DefaultDispatcher
import kotlinx.coroutines.experimental.withContext
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import javax.inject.Inject

class CoffeeMaker @Inject internal constructor(
Expand All @@ -28,7 +28,7 @@ class CoffeeMaker @Inject internal constructor(

suspend fun brew() {
// this function is async to verify intellij support for coroutines.
withContext(DefaultDispatcher) {
withContext(Dispatchers.Default) {
heater.get().on()
pump.pump()
println(" [_]P coffee! [_]P ")
Expand Down
6 changes: 3 additions & 3 deletions third_party/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ dependencies:
version: "0.45"
com.google.auto.service:
auto-service:
modules: ["", "auto-service-annotations"]
modules: ["", "annotations"]
lang: "java"
version: "1.0-rc5"
com.google.auto.value:
auto-value:
modules: ["", "auto-value-annotations"]
modules: ["", "annotations"]
lang: "java"
version: "1.6.5"
com.google.dagger:
Expand All @@ -55,7 +55,7 @@ dependencies:
kotlinx-coroutines:
modules: ["core"]
lang: "java"
version : "0.23.1"
version : "1.1.1"
org.pantsbuild:
jarjar:
lang: "java"
Expand Down
1 change: 0 additions & 1 deletion third_party/jvm/com/google/auto/service/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ java_library(
"//visibility:public",
],
exports = [
":auto_service_annotations",
"//external:jar/io_bazel_rules_kotlin_com/google/auto/service/auto_service",
],
runtime_deps = [
Expand Down
1 change: 0 additions & 1 deletion third_party/jvm/com/google/auto/value/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ java_library(
"//visibility:public",
],
exports = [
":auto_value_annotations",
"//external:jar/io_bazel_rules_kotlin_com/google/auto/value/auto_value",
],
)
Expand Down
14 changes: 0 additions & 14 deletions third_party/jvm/org/jetbrains/kotlinx/BUILD
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
licenses(["notice"])

java_library(
name = "atomicfu_common",
visibility = [
"//third_party/jvm:__subpackages__",
],
exports = [
"//external:jar/io_bazel_rules_kotlin_org/jetbrains/kotlinx/atomicfu_common",
],
runtime_deps = [
"//third_party/jvm/org/jetbrains/kotlin:kotlin_stdlib_common",
],
)

java_library(
name = "kotlinx_coroutines_core",
visibility = [
Expand All @@ -36,7 +23,6 @@ java_library(
"//external:jar/io_bazel_rules_kotlin_org/jetbrains/kotlinx/kotlinx_coroutines_core_common",
],
runtime_deps = [
":atomicfu_common",
"//third_party/jvm/org/jetbrains/kotlin:kotlin_stdlib_common",
],
)
9 changes: 4 additions & 5 deletions third_party/jvm/workspace.bzl

Large diffs are not rendered by default.

0 comments on commit 481fe1c

Please sign in to comment.