touchlab-lab / knarch.db

K(otlin)N(ative)A(rchitecture) Database
https://touchlab.co/
Apache License 2.0
90 stars 9 forks source link

sqldelight gradle plugin v1.0.0-kn0.9-a7 with kotlin-native-gradle-plugin:0.9 fails to build with "> org/jetbrains/kotlin/gradle/plugin/KotlinSourceSet" #51

Closed luca992 closed 5 years ago

luca992 commented 6 years ago

When applying: apply plugin: 'com.squareup.sqldelight'

while using kotlin-native-gradle-plugin:0.9 with your sqldelight build gradle-plugin:1.0.0-kn0.9-a7

I get the following error

A problem occurred evaluating project ':common'.

org/jetbrains/kotlin/gradle/plugin/KotlinSourceSet

If you update sample-notepad-sqldelight versions:

    ext.versions = [
        'supportLibrary'  : '27.1.0',
        'kotlin'          : '1.3-M2',
        'kotlin_native_version' : '0.9',
        'kotlinCoroutines': '0.26.0-eap13',
        'knarchDb'      : '0.7.2-kn0.9-a2',
        'knarchThreads'      : '0.3.2-kn0.9-a2',
        'sqldelight'      : '1.0.0-kn0.9-a7'
]

you will also encounter the bug

This is releated to kotlin 1.3-M2's bug

this is fixed in kotlin native 9.1 ... but I am wondering if you have a work-around for building with kotlin native 9.0? (Just because all dependencies in a project have to be compiled with the same kotlin native version and I am using coroutines compiled with native 9.0 in my project)

luca992 commented 5 years ago

Figured out you can use kotlin native gradle plugin 0.9 for now if you also apply:

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.70"