touchlab-lab / KotlinMultiplatformStarter

A boilerplate/starter repository for those looking for a fast, easy way to jump into Kotlin Multiplatform.

Home Page:https://medium.com/@ben_98270/two-apps-in-less-than-five-minutes-with-kotlin-multiplatform-bedf454a4a7b

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iOS build error after adding sqldelight/stately dependencies

joreilly opened this issue · comments

This isn't exactly an issue with this project (at least in terms of code that's there right now)....and feel free to close if not relevant....but if I add sqldelight/stately dependencies (as shown below) then I get error building iOS app (see error below). I'm seeing similar issue in my own project since moving to Kotlin 1.3.50 so wondering if there's some general issue since that update.

        commonMain {
            dependencies {
                implementation kotlin('stdlib-common')

                implementation "com.squareup.sqldelight:runtime:1.2.0"
                implementation "com.squareup.sqldelight:coroutines-extensions:1.2.0"
                
                implementation "co.touchlab:stately:0.9.3"
                implementation "co.touchlab:stately-collections:0.9.3"
            }
        }

The error is

> Task :app:linkDebugFrameworkIos FAILED
e: Could not find "stately" in [/Users/jooreill/dev/github/KotlinMultiplatformStarter/iosApp/Pods, /Users/jooreill/.konan/klib, /Users/jooreill/.konan/kotlin-native-macos-1.3.50/klib/common, /Users/jooreill/.konan/kotlin-native-macos-1.3.50/klib/platform/ios_x64].

The sample is created with as few changes as possible from the Intellij template sample, for better or worse. In this case, although basically every project will want to include gradle metadata for dependency management, it's not enabled by default.

Add the following to settings.gradle

enableFeaturePreview('GRADLE_METADATA')