sqldelight / sqldelight

SQLDelight - Generates typesafe Kotlin APIs from SQL
https://sqldelight.github.io/sqldelight/
Apache License 2.0
6.17k stars 516 forks source link

Migrating to kotlin 1.4, com.squareup.sqldelight:coroutines-extensions has build error #1917

Closed dss99911 closed 4 years ago

dss99911 commented 4 years ago

Build Environment SQLDelight version: 1.4.2 OS: Mac Gradle version: 6.6.1 Kotlin version: 1.4 AGP Version (if applicable):

Describe the bug Hi, I found issue while migrating to kotlin 1.4

when I build app, the error below occurs e: Could not find "kotlinx-coroutines-core_concurrentMain" in [/Users/hyun.kim/AndroidstudioProjects/my/androidLibrary, /Users/hyun.kim/.konan/klib, /Users/hyun.kim/.konan/kotlin-native-prebuilt-macos-1.4/klib/common, /Users/hyun.kim/.konan/kotlin-native-prebuilt-macos-1.4/klib/platform/ios_arm64].

I found the condition to occur the error

  1. use 'maven publish' apply(plugin: "maven-publish")

  2. iosMain source set contains file at least one

  3. dependency of ktor client io.ktor:ktor-client-core:1.4.0

  4. sqlite coroutine extension com.squareup.sqldelight:coroutines-extensions

the below is the gradle file I tested There was same error with org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 and it's went away when using 1.3.9-native-mt version but when 1.3.9-native-mt is used, if com.squareup.sqldelight:coroutines-extensions is used, this error occurs again.

build.gradle.kts

plugins {
    `maven-publish`
    kotlin("multiplatform")
}

kotlin {
    jvm()

    ios()

    sourceSets {
        val commonMain by getting {
            dependencies {
                api(deps.kotlin.coroutineCore)
                api(deps.ktor.clientCore)
                api(deps.sqldelight.coroutine)
            }
        }
    }
}
dss99911 commented 4 years ago

Though this issue is labeled as bug, Yet this seems not the bug. Problem seems that ktor client core 1.4 used coroutine mt and sqldelight not used coroutine mt as it's not released.

I solved this issue by removing com.squareup.sqldelight:coroutines-extensions dependency temporarily.

LouisCAD commented 4 years ago

@dss99911 Did you try specify the native-mt version with stricly to prevent Gradle from "upgrading" to non native-mt 1.3.9?

dss99911 commented 4 years ago

oops sorry. I didn't mention exact string of dependency. the below is I tested.

and wether I use 1.3.9 or 1.3.9-native-mt, the error occurs. and if I remove com.squareup.sqldelight:coroutines-extensions:1.4.2 with 1.3.9-native-mt then build success.

without com.squareup.sqldelight:coroutines-extensions:1.4.2 and 1.3.9 then still error occurs.

let me know if there is further question.

thanks

plugins {
    `maven-publish`
    kotlin("multiplatform")
}

kotlin {
    jvm()

    ios()

    sourceSets {
        val commonMain by getting {
            dependencies {
                api("io.ktor:ktor-client-core:1.4.0")
                api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt")
                api("com.squareup.sqldelight:coroutines-extensions:1.4.2")
            }
        }
    }
}
LouisCAD commented 4 years ago

@dss99911 Please try to do that:

api("org.jetbrains.kotlinx:kotlinx-coroutines-core") {
    version {
        strictly("1.3.9-native-mt")
    }
}
dss99911 commented 4 years ago

@LouisCAD thanks for reply. I tried the below

dependencies {
                api("io.ktor:ktor-client-core:1.4.0")
                api("org.jetbrains.kotlinx:kotlinx-coroutines-core") {
                    version {
                         strictly("1.3.9-native-mt")
                     }
                }
                api("com.squareup.sqldelight:coroutines-extensions:1.4.2")
}

and the error below occurred.

Could not determine the dependencies of task ':app:compileIosMainKotlinMetadata'.
> Couldn't resolve metadata artifact for ModuleDependencyIdentifier(groupId=org.jetbrains.kotlinx, moduleId=kotlinx-coroutines-core) in configuration ':app:iosArm64CompileKlibraries'

It was working fine, if remove api("com.squareup.sqldelight:coroutines-extensions:1.4.2")

AlecKazakova commented 4 years ago

if you run ./gradlew dependencyInsight what do you see for kotlinx-coroutines?

dss99911 commented 4 years ago

with this dependencies

dependencies {
                api("io.ktor:ktor-client-core:1.4.0")
                api("org.jetbrains.kotlinx:kotlinx-coroutines-core") {
                    version {
                         strictly("1.3.9-native-mt")
                     }
                }
                api("com.squareup.sqldelight:coroutines-extensions:1.4.2")
}

I tried below

./gradlew app:dependencyInsight --configuration releaseCompileClasspath --dependency kotlinx-coroutines-core

and received this result please let me know if the command is not appropriate.

Thanks

> Task app:dependencyInsight
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt
   variant "jvm-api" [
      org.gradle.libraryelements                     = jar (not requested)
      org.gradle.usage                               = java-api
      org.jetbrains.kotlin.platform.type             = jvm (compatible with: androidJvm)
      org.gradle.status                              = release (not requested)

      Requested attributes not found in the selected variant:
         com.android.build.api.attributes.BuildTypeAttr = release
   ]
   Selection reasons:
      - By constraint : releaseRuntimeClasspath uses version 1.3.9-native-mt
      - By ancestor

org.jetbrains.kotlinx:kotlinx-coroutines-core:{strictly 1.3.9-native-mt} -> 1.3.9-native-mt
+--- releaseCompileClasspath
\--- releaseCompileClasspath

org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6 -> 1.3.9-native-mt
+--- androidx.compose.runtime:runtime:1.0.0-alpha01
|    +--- releaseCompileClasspath (requested androidx.compose.runtime:runtime:{strictly 1.0.0-alpha01})
|    +--- androidx.compose.material:material:1.0.0-alpha01
|    |    \--- releaseCompileClasspath
|    +--- androidx.ui:ui-tooling:1.0.0-alpha01
|    |    \--- releaseCompileClasspath
|    +--- androidx.compose.foundation:foundation:1.0.0-alpha01
|    |    +--- releaseCompileClasspath (requested androidx.compose.foundation:foundation:{strictly 1.0.0-alpha01})
|    |    \--- androidx.compose.material:material:1.0.0-alpha01 (*)
|    +--- androidx.compose.animation:animation:1.0.0-alpha01
|    |    +--- releaseCompileClasspath (requested androidx.compose.animation:animation:{strictly 1.0.0-alpha01})
|    |    \--- androidx.compose.foundation:foundation:1.0.0-alpha01 (*)
|    \--- androidx.compose.runtime:runtime-saved-instance-state:1.0.0-alpha01
|         +--- releaseCompileClasspath (requested androidx.compose.runtime:runtime-saved-instance-state:{strictly 1.0.0-alpha01})
|         +--- androidx.compose.foundation:foundation:1.0.0-alpha01 (*)
|         \--- androidx.compose.ui:ui:1.0.0-alpha01
|              +--- releaseCompileClasspath
|              +--- androidx.compose.material:material:1.0.0-alpha01 (*)
|              +--- androidx.ui:ui-tooling:1.0.0-alpha01 (*)
|              +--- androidx.compose.foundation:foundation:1.0.0-alpha01 (*)
|              +--- androidx.compose.animation:animation:1.0.0-alpha01 (*)
|              +--- androidx.compose.foundation:foundation-layout:1.0.0-alpha01
|              |    +--- releaseCompileClasspath
|              |    \--- androidx.compose.animation:animation:1.0.0-alpha01 (*)
|              +--- androidx.compose.material:material-icons-core:1.0.0-alpha01
|              |    +--- releaseCompileClasspath (requested androidx.compose.material:material-icons-core:{strictly 1.0.0-alpha01})
|              |    +--- androidx.compose.material:material:1.0.0-alpha01 (*)
|              |    \--- androidx.compose.material:material-icons-extended:1.0.0-alpha01
|              |         \--- releaseCompileClasspath
|              \--- androidx.compose.foundation:foundation-text:1.0.0-alpha01
|                   +--- releaseCompileClasspath (requested androidx.compose.foundation:foundation-text:{strictly 1.0.0-alpha01})
|                   \--- androidx.compose.material:material:1.0.0-alpha01 (*)
+--- androidx.compose.runtime:runtime-dispatch:1.0.0-alpha01
|    +--- releaseCompileClasspath (requested androidx.compose.runtime:runtime-dispatch:{strictly 1.0.0-alpha01})
|    \--- androidx.compose.runtime:runtime:1.0.0-alpha01 (*)
\--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6
     +--- releaseCompileClasspath (requested org.jetbrains.kotlinx:kotlinx-coroutines-android:{strictly 1.3.6})
     +--- org.jetbrains.anko:anko-appcompat-v7-coroutines:0.10.8 (requested org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0)
     |    +--- releaseCompileClasspath (requested org.jetbrains.anko:anko-appcompat-v7-coroutines:{strictly 0.10.8})
     |    \--- org.jetbrains.anko:anko:0.10.8
     |         \--- releaseCompileClasspath
     +--- androidx.work:work-runtime-ktx:2.3.1 (requested org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0)
     |    \--- releaseCompileClasspath
     +--- androidx.compose.runtime:runtime:1.0.0-alpha01 (*)
     +--- org.jetbrains.anko:anko-coroutines:0.10.8 (requested org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0)
     |    +--- releaseCompileClasspath (requested org.jetbrains.anko:anko-coroutines:{strictly 0.10.8})
     |    \--- org.jetbrains.anko:anko:0.10.8 (*)
     \--- org.jetbrains.anko:anko-sdk27-coroutines:0.10.8 (requested org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0)
          +--- releaseCompileClasspath (requested org.jetbrains.anko:anko-sdk27-coroutines:{strictly 0.10.8})
          \--- org.jetbrains.anko:anko:0.10.8 (*)

org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-native-mt-1.4.0-rc -> 1.3.9-native-mt
+--- io.ktor:ktor-client-auth-jvm:1.4.0
|    +--- releaseCompileClasspath (requested io.ktor:ktor-client-auth-jvm:{strictly 1.4.0})
|    \--- io.ktor:ktor-client-auth:1.4.0
|         \--- releaseCompileClasspath
+--- io.ktor:ktor-client-core-jvm:1.4.0
|    +--- releaseCompileClasspath (requested io.ktor:ktor-client-core-jvm:{strictly 1.4.0})
|    \--- io.ktor:ktor-client-core:1.4.0
|         +--- releaseCompileClasspath
|         +--- io.ktor:ktor-client-android:1.4.0
|         |    \--- releaseCompileClasspath
|         +--- io.ktor:ktor-client-logging-jvm:1.4.0
|         |    +--- releaseCompileClasspath (requested io.ktor:ktor-client-logging-jvm:{strictly 1.4.0})
|         |    \--- io.ktor:ktor-client-logging:1.4.0
|         |         \--- releaseCompileClasspath
|         +--- io.ktor:ktor-client-auth-jvm:1.4.0 (*)
|         \--- io.ktor:ktor-client-json-jvm:1.4.0
|              +--- releaseCompileClasspath (requested io.ktor:ktor-client-json-jvm:{strictly 1.4.0})
|              \--- io.ktor:ktor-client-json:1.4.0
|                   +--- releaseCompileClasspath (requested io.ktor:ktor-client-json:{strictly 1.4.0})
|                   \--- io.ktor:ktor-client-serialization-jvm:1.4.0
|                        +--- releaseCompileClasspath (requested io.ktor:ktor-client-serialization-jvm:{strictly 1.4.0})
|                        \--- io.ktor:ktor-client-serialization:1.4.0
|                             \--- releaseCompileClasspath
+--- io.ktor:ktor-client-json-jvm:1.4.0 (*)
+--- io.ktor:ktor-client-logging-jvm:1.4.0 (*)
+--- io.ktor:ktor-client-serialization-jvm:1.4.0 (*)
+--- io.ktor:ktor-http-cio-jvm:1.4.0
|    +--- releaseCompileClasspath (requested io.ktor:ktor-http-cio-jvm:{strictly 1.4.0})
|    \--- io.ktor:ktor-http-cio:1.4.0
|         +--- releaseCompileClasspath (requested io.ktor:ktor-http-cio:{strictly 1.4.0})
|         \--- io.ktor:ktor-client-core-jvm:1.4.0 (*)
+--- io.ktor:ktor-http-jvm:1.4.0
|    +--- releaseCompileClasspath (requested io.ktor:ktor-http-jvm:{strictly 1.4.0})
|    \--- io.ktor:ktor-http:1.4.0
|         +--- releaseCompileClasspath (requested io.ktor:ktor-http:{strictly 1.4.0})
|         +--- io.ktor:ktor-client-core-jvm:1.4.0 (*)
|         \--- io.ktor:ktor-http-cio-jvm:1.4.0 (*)
+--- io.ktor:ktor-io-jvm:1.4.0
|    +--- releaseCompileClasspath (requested io.ktor:ktor-io-jvm:{strictly 1.4.0})
|    \--- io.ktor:ktor-io:1.4.0
|         +--- releaseCompileClasspath (requested io.ktor:ktor-io:{strictly 1.4.0})
|         \--- io.ktor:ktor-utils-jvm:1.4.0
|              +--- releaseCompileClasspath (requested io.ktor:ktor-utils-jvm:{strictly 1.4.0})
|              \--- io.ktor:ktor-utils:1.4.0
|                   +--- releaseCompileClasspath (requested io.ktor:ktor-utils:{strictly 1.4.0})
|                   +--- io.ktor:ktor-http-jvm:1.4.0 (*)
|                   \--- io.ktor:ktor-network-jvm:1.4.0
|                        +--- releaseCompileClasspath (requested io.ktor:ktor-network-jvm:{strictly 1.4.0})
|                        \--- io.ktor:ktor-network:1.4.0
|                             +--- releaseCompileClasspath (requested io.ktor:ktor-network:{strictly 1.4.0})
|                             \--- io.ktor:ktor-http-cio-jvm:1.4.0 (*)
+--- io.ktor:ktor-network-jvm:1.4.0 (*)
\--- io.ktor:ktor-utils-jvm:1.4.0 (*)

org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.3.9-native-mt
\--- com.squareup.sqldelight:coroutines-extensions-jvm:1.4.2
     +--- releaseCompileClasspath (requested com.squareup.sqldelight:coroutines-extensions-jvm:{strictly 1.4.2})
     \--- com.squareup.sqldelight:coroutines-extensions:1.4.2
          \--- releaseCompileClasspath

org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.6
   variant "compile" [
      org.gradle.status                              = release (not requested)
      org.gradle.usage                               = java-api
      org.gradle.libraryelements                     = jar (not requested)
      org.gradle.category                            = library (not requested)

      Requested attributes not found in the selected variant:
         com.android.build.api.attributes.BuildTypeAttr = release
         org.jetbrains.kotlin.platform.type             = androidJvm
   ]
   Selection reasons:
      - By constraint : releaseRuntimeClasspath uses version 1.3.6
      - By ancestor

org.jetbrains.kotlinx:kotlinx-coroutines-core-common:{strictly 1.3.6} -> 1.3.6
\--- releaseCompileClasspath

org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.6
\--- androidx.compose.runtime:runtime-dispatch:1.0.0-alpha01
     +--- releaseCompileClasspath (requested androidx.compose.runtime:runtime-dispatch:{strictly 1.0.0-alpha01})
     \--- androidx.compose.runtime:runtime:1.0.0-alpha01
          +--- releaseCompileClasspath (requested androidx.compose.runtime:runtime:{strictly 1.0.0-alpha01})
          +--- androidx.compose.material:material:1.0.0-alpha01
          |    \--- releaseCompileClasspath
          +--- androidx.ui:ui-tooling:1.0.0-alpha01
          |    \--- releaseCompileClasspath
          +--- androidx.compose.foundation:foundation:1.0.0-alpha01
          |    +--- releaseCompileClasspath (requested androidx.compose.foundation:foundation:{strictly 1.0.0-alpha01})
          |    \--- androidx.compose.material:material:1.0.0-alpha01 (*)
          +--- androidx.compose.animation:animation:1.0.0-alpha01
          |    +--- releaseCompileClasspath (requested androidx.compose.animation:animation:{strictly 1.0.0-alpha01})
          |    \--- androidx.compose.foundation:foundation:1.0.0-alpha01 (*)
          \--- androidx.compose.runtime:runtime-saved-instance-state:1.0.0-alpha01
               +--- releaseCompileClasspath (requested androidx.compose.runtime:runtime-saved-instance-state:{strictly 1.0.0-alpha01})
               +--- androidx.compose.foundation:foundation:1.0.0-alpha01 (*)
               \--- androidx.compose.ui:ui:1.0.0-alpha01
                    +--- releaseCompileClasspath
                    +--- androidx.compose.material:material:1.0.0-alpha01 (*)
                    +--- androidx.ui:ui-tooling:1.0.0-alpha01 (*)
                    +--- androidx.compose.foundation:foundation:1.0.0-alpha01 (*)
                    +--- androidx.compose.animation:animation:1.0.0-alpha01 (*)
                    +--- androidx.compose.foundation:foundation-layout:1.0.0-alpha01
                    |    +--- releaseCompileClasspath
                    |    \--- androidx.compose.animation:animation:1.0.0-alpha01 (*)
                    +--- androidx.compose.material:material-icons-core:1.0.0-alpha01
                    |    +--- releaseCompileClasspath (requested androidx.compose.material:material-icons-core:{strictly 1.0.0-alpha01})
                    |    +--- androidx.compose.material:material:1.0.0-alpha01 (*)
                    |    \--- androidx.compose.material:material-icons-extended:1.0.0-alpha01
                    |         \--- releaseCompileClasspath
                    \--- androidx.compose.foundation:foundation-text:1.0.0-alpha01
                         +--- releaseCompileClasspath (requested androidx.compose.foundation:foundation-text:{strictly 1.0.0-alpha01})
                         \--- androidx.compose.material:material:1.0.0-alpha01 (*)

org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.3.9-native-mt
   variant "jvm-api" [
      org.gradle.libraryelements                     = jar (not requested)
      org.gradle.usage                               = java-api
      org.jetbrains.kotlin.platform.type             = jvm (compatible with: androidJvm)
      org.gradle.status                              = release (not requested)

      Requested attributes not found in the selected variant:
         com.android.build.api.attributes.BuildTypeAttr = release
   ]
   Selection reasons:
      - By constraint : releaseRuntimeClasspath uses version 1.3.9-native-mt
      - By ancestor

org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:{strictly 1.3.9-native-mt} -> 1.3.9-native-mt
\--- releaseCompileClasspath

org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.3.9-native-mt
\--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt
     +--- releaseCompileClasspath (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:{strictly 1.3.9-native-mt})
     +--- com.squareup.sqldelight:coroutines-extensions-jvm:1.4.2 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9)
     |    +--- releaseCompileClasspath (requested com.squareup.sqldelight:coroutines-extensions-jvm:{strictly 1.4.2})
     |    \--- com.squareup.sqldelight:coroutines-extensions:1.4.2
     |         \--- releaseCompileClasspath
     +--- androidx.compose.runtime:runtime:1.0.0-alpha01 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6)
     |    +--- releaseCompileClasspath (requested androidx.compose.runtime:runtime:{strictly 1.0.0-alpha01})
     |    +--- androidx.compose.material:material:1.0.0-alpha01
     |    |    \--- releaseCompileClasspath
     |    +--- androidx.ui:ui-tooling:1.0.0-alpha01
     |    |    \--- releaseCompileClasspath
     |    +--- androidx.compose.foundation:foundation:1.0.0-alpha01
     |    |    +--- releaseCompileClasspath (requested androidx.compose.foundation:foundation:{strictly 1.0.0-alpha01})
     |    |    \--- androidx.compose.material:material:1.0.0-alpha01 (*)
     |    +--- androidx.compose.animation:animation:1.0.0-alpha01
     |    |    +--- releaseCompileClasspath (requested androidx.compose.animation:animation:{strictly 1.0.0-alpha01})
     |    |    \--- androidx.compose.foundation:foundation:1.0.0-alpha01 (*)
     |    \--- androidx.compose.runtime:runtime-saved-instance-state:1.0.0-alpha01
     |         +--- releaseCompileClasspath (requested androidx.compose.runtime:runtime-saved-instance-state:{strictly 1.0.0-alpha01})
     |         +--- androidx.compose.foundation:foundation:1.0.0-alpha01 (*)
     |         \--- androidx.compose.ui:ui:1.0.0-alpha01
     |              +--- releaseCompileClasspath
     |              +--- androidx.compose.material:material:1.0.0-alpha01 (*)
     |              +--- androidx.ui:ui-tooling:1.0.0-alpha01 (*)
     |              +--- androidx.compose.foundation:foundation:1.0.0-alpha01 (*)
     |              +--- androidx.compose.animation:animation:1.0.0-alpha01 (*)
     |              +--- androidx.compose.foundation:foundation-layout:1.0.0-alpha01
     |              |    +--- releaseCompileClasspath
     |              |    \--- androidx.compose.animation:animation:1.0.0-alpha01 (*)
     |              +--- androidx.compose.material:material-icons-core:1.0.0-alpha01
     |              |    +--- releaseCompileClasspath (requested androidx.compose.material:material-icons-core:{strictly 1.0.0-alpha01})
     |              |    +--- androidx.compose.material:material:1.0.0-alpha01 (*)
     |              |    \--- androidx.compose.material:material-icons-extended:1.0.0-alpha01
     |              |         \--- releaseCompileClasspath
     |              \--- androidx.compose.foundation:foundation-text:1.0.0-alpha01
     |                   +--- releaseCompileClasspath (requested androidx.compose.foundation:foundation-text:{strictly 1.0.0-alpha01})
     |                   \--- androidx.compose.material:material:1.0.0-alpha01 (*)
     +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6)
     |    +--- releaseCompileClasspath (requested org.jetbrains.kotlinx:kotlinx-coroutines-android:{strictly 1.3.6})
     |    +--- org.jetbrains.anko:anko-appcompat-v7-coroutines:0.10.8 (requested org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0)
     |    |    +--- releaseCompileClasspath (requested org.jetbrains.anko:anko-appcompat-v7-coroutines:{strictly 0.10.8})
     |    |    \--- org.jetbrains.anko:anko:0.10.8
     |    |         \--- releaseCompileClasspath
     |    +--- androidx.work:work-runtime-ktx:2.3.1 (requested org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0)
     |    |    \--- releaseCompileClasspath
     |    +--- androidx.compose.runtime:runtime:1.0.0-alpha01 (*)
     |    +--- org.jetbrains.anko:anko-coroutines:0.10.8 (requested org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0)
     |    |    +--- releaseCompileClasspath (requested org.jetbrains.anko:anko-coroutines:{strictly 0.10.8})
     |    |    \--- org.jetbrains.anko:anko:0.10.8 (*)
     |    \--- org.jetbrains.anko:anko-sdk27-coroutines:0.10.8 (requested org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0)
     |         +--- releaseCompileClasspath (requested org.jetbrains.anko:anko-sdk27-coroutines:{strictly 0.10.8})
     |         \--- org.jetbrains.anko:anko:0.10.8 (*)
     +--- io.ktor:ktor-client-logging-jvm:1.4.0 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-native-mt-1.4.0-rc)
     |    +--- releaseCompileClasspath (requested io.ktor:ktor-client-logging-jvm:{strictly 1.4.0})
     |    \--- io.ktor:ktor-client-logging:1.4.0
     |         \--- releaseCompileClasspath
     +--- io.ktor:ktor-client-auth-jvm:1.4.0 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-native-mt-1.4.0-rc)
     |    +--- releaseCompileClasspath (requested io.ktor:ktor-client-auth-jvm:{strictly 1.4.0})
     |    \--- io.ktor:ktor-client-auth:1.4.0
     |         \--- releaseCompileClasspath
     +--- io.ktor:ktor-client-serialization-jvm:1.4.0 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-native-mt-1.4.0-rc)
     |    +--- releaseCompileClasspath (requested io.ktor:ktor-client-serialization-jvm:{strictly 1.4.0})
     |    \--- io.ktor:ktor-client-serialization:1.4.0
     |         \--- releaseCompileClasspath
     +--- io.ktor:ktor-client-json-jvm:1.4.0 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-native-mt-1.4.0-rc)
     |    +--- releaseCompileClasspath (requested io.ktor:ktor-client-json-jvm:{strictly 1.4.0})
     |    \--- io.ktor:ktor-client-json:1.4.0
     |         +--- releaseCompileClasspath (requested io.ktor:ktor-client-json:{strictly 1.4.0})
     |         \--- io.ktor:ktor-client-serialization-jvm:1.4.0 (*)
     +--- io.ktor:ktor-client-core-jvm:1.4.0 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-native-mt-1.4.0-rc)
     |    +--- releaseCompileClasspath (requested io.ktor:ktor-client-core-jvm:{strictly 1.4.0})
     |    \--- io.ktor:ktor-client-core:1.4.0
     |         +--- releaseCompileClasspath
     |         +--- io.ktor:ktor-client-android:1.4.0
     |         |    \--- releaseCompileClasspath
     |         +--- io.ktor:ktor-client-logging-jvm:1.4.0 (*)
     |         +--- io.ktor:ktor-client-auth-jvm:1.4.0 (*)
     |         \--- io.ktor:ktor-client-json-jvm:1.4.0 (*)
     +--- androidx.compose.runtime:runtime-dispatch:1.0.0-alpha01 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6)
     |    +--- releaseCompileClasspath (requested androidx.compose.runtime:runtime-dispatch:{strictly 1.0.0-alpha01})
     |    \--- androidx.compose.runtime:runtime:1.0.0-alpha01 (*)
     +--- io.ktor:ktor-http-cio-jvm:1.4.0 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-native-mt-1.4.0-rc)
     |    +--- releaseCompileClasspath (requested io.ktor:ktor-http-cio-jvm:{strictly 1.4.0})
     |    \--- io.ktor:ktor-http-cio:1.4.0
     |         +--- releaseCompileClasspath (requested io.ktor:ktor-http-cio:{strictly 1.4.0})
     |         \--- io.ktor:ktor-client-core-jvm:1.4.0 (*)
     +--- io.ktor:ktor-http-jvm:1.4.0 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-native-mt-1.4.0-rc)
     |    +--- releaseCompileClasspath (requested io.ktor:ktor-http-jvm:{strictly 1.4.0})
     |    \--- io.ktor:ktor-http:1.4.0
     |         +--- releaseCompileClasspath (requested io.ktor:ktor-http:{strictly 1.4.0})
     |         +--- io.ktor:ktor-client-core-jvm:1.4.0 (*)
     |         \--- io.ktor:ktor-http-cio-jvm:1.4.0 (*)
     +--- io.ktor:ktor-network-jvm:1.4.0 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-native-mt-1.4.0-rc)
     |    +--- releaseCompileClasspath (requested io.ktor:ktor-network-jvm:{strictly 1.4.0})
     |    \--- io.ktor:ktor-network:1.4.0
     |         +--- releaseCompileClasspath (requested io.ktor:ktor-network:{strictly 1.4.0})
     |         \--- io.ktor:ktor-http-cio-jvm:1.4.0 (*)
     +--- io.ktor:ktor-utils-jvm:1.4.0 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-native-mt-1.4.0-rc)
     |    +--- releaseCompileClasspath (requested io.ktor:ktor-utils-jvm:{strictly 1.4.0})
     |    \--- io.ktor:ktor-utils:1.4.0
     |         +--- releaseCompileClasspath (requested io.ktor:ktor-utils:{strictly 1.4.0})
     |         +--- io.ktor:ktor-http-jvm:1.4.0 (*)
     |         \--- io.ktor:ktor-network-jvm:1.4.0 (*)
     \--- io.ktor:ktor-io-jvm:1.4.0 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-native-mt-1.4.0-rc)
          +--- releaseCompileClasspath (requested io.ktor:ktor-io-jvm:{strictly 1.4.0})
          \--- io.ktor:ktor-io:1.4.0
               +--- releaseCompileClasspath (requested io.ktor:ktor-io:{strictly 1.4.0})
               \--- io.ktor:ktor-utils-jvm:1.4.0 (*)

(*) - dependencies omitted (listed previously)

A web-based, searchable dependency report is available by adding the --scan option.

BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
AlecKazakova commented 4 years ago

if you remove the dependency on coroutines and only have the sqldelight coroutines extension dependency does it work?

dss99911 commented 4 years ago

do you mean removing coroutine dependency like the below?

dependencies {
                api("io.ktor:ktor-client-core:1.4.0")
                api("com.squareup.sqldelight:coroutines-extensions:1.4.2")
}

when try the above, the error below occurred.

e: Could not find "kotlinx-coroutines-core_concurrentMain" in [/Users/hyun.kim/AndroidstudioProjects/my/androidLibrary, /Users/hyun.kim/.konan/klib, /Users/hyun.kim/.konan/kotlin-native-prebuilt-macos-1.4/klib/common, /Users/hyun.kim/.konan/kotlin-native-prebuilt-macos-1.4/klib/platform/ios_arm64].
dss99911 commented 4 years ago

previously If I remove maven-publish on plugins, it was working fine. but, can't publish.

AlecKazakova commented 4 years ago

you mean if you remove the maven-publish plugin everything works including the sqldelight coroutines extension?

dss99911 commented 4 years ago

I didn't intended to use coroutine native-mt

apply(plugin: "maven-publish")

api("io.ktor:ktor-client-core:1.4.0")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9")

but the combination above caused the error below

e: Could not find "kotlinx-coroutines-core_concurrentMain"

and it's resolved after changing coroutine version to native-mt but after adding api("com.squareup.sqldelight:coroutines-extensions:1.4.2") same error occurred again.

dss99911 commented 4 years ago

I think it's transition period to native-mt. and after removing coroutines-extensions. it's working fine. as I just using asFlow() function only. it's fine for me not to use for the time being. as I heard that native-mt will be default soon. then I expect this will be fixed automatically. so, this issue's priority may be low

AlecKazakova commented 4 years ago

yea - we don't use the coroutines extension at the moment so I can't point towards a working setup. Maybe another watcher who has got it working successfully can chime in but I don't know how much more help I can be

dss99911 commented 4 years ago

okay. Thanks for taking care 👍