Add linuxX64 Kotlin Multiplatform target
See original GitHub issueCurrently, SQLDelight supports only Apple and Windows as native platform targets. If you want to use it in a project that also targets linux, then you can’t even use it for other targets as the gradle plugin seems to attempt to math the native variant:
Execution failed for task ':cinteropSodiumLinux'.
> Could not resolve all files for configuration ':linuxSodiumCInterop'.
> Could not resolve com.squareup.sqldelight:runtime:1.4.0.
Required by:
project :
> Unable to find a matching variant of com.squareup.sqldelight:runtime:1.4.0:
- Variant 'iosArm32-api' capability com.squareup.sqldelight:runtime:1.4.0:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'linux_x64' and found incompatible value 'ios_arm32'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'iosArm64-api' capability com.squareup.sqldelight:runtime:1.4.0:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'linux_x64' and found incompatible value 'ios_arm64'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
and so on for all supported native variants.
The best fix would be to add the linuxX64
variant as well which probably hasn’t happened because all developers are on Mac!?
Unfortunately, it seems that touchlab’s SQLiter needs to add support first.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:25 (14 by maintainers)
Top Results From Across the Web
Set up targets for Kotlin Multiplatform
You can add targets when creating a project with the Project Wizard. If you need to add a target later, you can do...
Read more >Introduction to Multiplatform Programming in Kotlin - Baeldung
In this tutorial, we'll understand multiplatform programming in Kotlin. We'll develop a simple application that will target multiple ...
Read more >Creating a Kotlin Multiplatform lib targeting all native targets ...
I am trying to create a Kotlin Multiplatform library that targets all native targets. Currently I can create a library targeting a specific ......
Read more >Optimising CI build times of a Kotlin Multiplatform project
Kotlin Multiplatform supports different targets (platforms), which require ... First thing we need is to add another command line argument: ...
Read more >Adding an Android Target to a Kotlin Multiplatform Project
This is the third post in a series on Kotlin Multiplatform. In my second post, I walked you through the steps to build...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I opened a PR on the
SQLiter
repo which adds support for linux targets. Once that one (or something similar) is merged it actually should be pretty straight forward to add linux as a target here (the changes i needed to make on my local build were pretty minimal but maybe I don’t see the full picture). Depending on the outcome of said PR i could also file a PR here once it’s merged. It depends on whether this is wanted with the current state ofSQLiter
(refering to the above comment of @kpgalligan) and you would welcome such a PR regardless of the state ofSQLiter
.Please send a PR when the dependency is ready. We won’t be able to have a passing build until all our dependencies are updated.