Gradle Plugin clobbers the kotlinx.coroutines
package making it incompatible with Kotlin 1.9
#4088
Labels
kotlinx.coroutines
package making it incompatible with Kotlin 1.9
#4088
SQLDelight Version
2.0.0-alpha05
Operating System
MacOS arm 64
Gradle Version
8.1.1
Kotlin Version
1.9.0-dev-6609
Dialect
SQLite
AGP Version
No response
Describe the Bug
The Gradle Plugin shadows some dependencies including
kotlinx.coroutines
which depending how it ends up being loaded by Gradle can clash with KGP.The specific problem I bumped into is when using KGP 1.9 previews that are using coroutines:
The version of coroutines that is shaded is coroutines
1.5.2
, transitively included by intelliJ core:And the problem is that the
1.5.2
version of coroutines doesn't contain fun CoroutineContext.newCoroutineContext(CoroutineContext) added in 1.6.1A quick fix is to explicitly shade a newer version (
1.6.4
or so) but that still feels fragile as this version (as well as other shaded dependencies) need to be tracked and updated manually.Another fix would be to relocate at the same time as shadowing, possibly using R8 to avoid bumping into GradleUp/shadow#232. If there's interest, I could look into that last option, let me know.
Stacktrace
No response
Gradle Build Script
No response
The text was updated successfully, but these errors were encountered: