I'm on a pretty new multi-platform project ( Android + iOs, actually ) and I'm trying to import SqlDelight 1.0.0
Added the dependency in the classpath and applied the plugin, in fact the code generation works flawlessly, but com.squareup is not resolved, neither in the generated code, neither in my files.
I inspected the project structure and found out only the jvm dependency is there in my _app_ module ( Gradle: com.squareup.sqldelight:runtime-jvm:1.0.0@jar ) and, in fact, com.squareup.sqldelight si resolved for the files in _main_ module ( jvm ), but not for others.
If any addition detail is needed, please tell me, not very experienced in Kotlin multi-platform, probably that's my fault.
do you have a repo i can take a look at to reproduce? Also make sure you're on the latest version of Intellij (2018.3.2) or Android Studio (Canary 3.4) + the kotlin intellij plugin (1.3.11) since only the latest versions of the IDE are supporting multiplatform.
If no, I'd take a look at the sample's gradle and see if there's a difference, or maybe check out the sample and make sure that is working on your machine.
IntelliJ IDEA 2018.3.2 (Ultimate Edition)
Build #IU-183.4886.37, built on December 17, 2018
JRE: 1.8.0_152-release-1343-b26 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.2
Kotlin plugin v1.3.11-release-IJ2018.3-1
Took a look at that sample, but I didn't find anything suspicious.
P.S. also tried to re-import the project.
That's the repo ( just made it public, in case the change didn't apply yet )
https://github.com/4face-studi0/FreshTv
Thanks for now :)
it might be this: #1028
try moving apply plugin: com.squareup.sqldelight before apply plugin: "kotlin-android-extensions"
you might also have to do apply plugin: "org.jetbrains.kotlin.multiplatform" syntax instead of
plugins {
id: "org.jetbrains.kotlin.multiplatform" version:1.3.11
}
because I don't think the two apply plugin styles are compatible
Ow, wait, didn't commit the changes, already tried that. Did it now
ahhhhhhhhhhh right you need
enableFeaturePreview('GRADLE_METADATA')
in your root settings.gradle. I'll add to the README.
Awesome!! Solved :)
Most helpful comment
ahhhhhhhhhhh right you need
in your root settings.gradle. I'll add to the README.