František Hlinka
11/25/2020, 10:54 PMios()
target shortcut inside the kotlin {…}
block in build.gradle.kts
to create iOS targets for simulator and device and use the same iosMain
source set. However, the dependencies of the iOS target do not get resolved correctly in the IDE (specifically speaking, the Platform
object, or SQLDelight’s NativeSqliteDriver
).
If hierarchical project structure is disabled - e.g. gradle.properties
does not include
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
, then the project builds anyway even if the IDE can’t resolve the classes. If I add those two lines, the build fails too. This is happening on Kotlin 1.4.10 and 1.4.20.
Does anyone know what’s the problem or where should I open an issue? Thanks lots!Rhony
11/26/2020, 1:50 AMkotlin {
val onPhone = System.getenv("SDK_NAME")?.startsWith("iphoneos") ?: false
if (onPhone) iosArm64("ios")
else iosX64("ios")
}
for more info here Adding Sqldelight on moko
or here Unresolved reference: com.squareup.sqldelight.drivers.native.NativeSqliteDriverFrantišek Hlinka
11/26/2020, 10:56 AMArtyom Degtyarev [JB]
11/26/2020, 11:03 AMFrantišek Hlinka
11/26/2020, 11:21 AMArtyom Degtyarev [JB]
11/26/2020, 11:25 AMenableGranularSourceSetsMetadata
disabled. AFAIK it is about highlighting only, but I’ll be more confident as soon as someone will confirm.František Hlinka
11/26/2020, 11:43 AM