Attemping to upgrade sqlDelight-version from `1.5....
# squarelibraries
h
Attemping to upgrade sqlDelight-version from
1.5.5
to
2.0.0-rc01
in a KMM-project but I keep running into this issue when building the project from an M2-machine. Anyone familier with this?
Copy code
* What went wrong:
Execution failed for task ':compileKotlinIosArm64'.
> Could not resolve all files for configuration ':iosArm64CompileKlibraries'.
   > Could not resolve app.cash.sqldelight:sqlite-driver:2.0.0-rc01.
     Required by:
         project :
      > No matching variant of app.cash.sqldelight:sqlite-driver:2.0.0-rc01 was found. The consumer was configured to find a usage of 'kotlin-api' of a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64' but:
          - Variant 'apiElements' capability app.cash.sqldelight:sqlite-driver:2.0.0-rc01 declares an API of a library, preferably optimized for standard JVMs:
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')
          - Variant 'runtimeElements' capability app.cash.sqldelight:sqlite-driver:2.0.0-rc01 declares a runtime of a library, preferably optimized for standard JVMs:
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')
Continuing here @hfhbd. My dependencies are defined like this:
Copy code
sourceSets {
        ...

        val iosMain by getting {
            dependencies {
                implementation("io.ktor:ktor-client-ios:$ktorVersion")
                implementation("app.cash.sqldelight:native-driver:$sqlDelightVersion")
            }
        }
        val iosTest by getting {
            dependencies {
                implementation("app.cash.sqldelight:native-driver:$sqlDelightVersion")
            }
        }
From what I can tell I have declared the native driver to both iosTest and IosMain. Do you see anything wrong? As stated previously, this problem only occured after I updated to the newest version of sqlDeligth.
h
This code snippet locks correct though.
h
Yeah, this is very confusing.
h
Well, you could have other plugins/dependencies resulting into this error, I don’t know your full build script. A build scan would be helpful.
h
Scan completed:
191 Views