hello, just a hit a weird error -> I'm writing ...
# gradle
d
hello, just a hit a weird error -> I'm writing custom plugin that relies on coroutines 1.3. When I try to apply it on a project and run my custom task I'm getting exception complaining
Copy code
Caused by: java.lang.NoSuchMethodError: kotlinx.coroutines.CoroutineScopeKt.cancel(Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Ljava/lang/Throwable;)V
which points to old version of coroutines lib being used. Sure enough by running
gradle dependencies
I see
Copy code
kotlinCompilerPluginClasspath
\--- org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.61
...
     |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1
any ideaes on how to fix this?
d
well so my build file is very simple
Copy code
plugins {
    id("myPlugin")
}

dependencies {
    implementation("myLib")
}
and within those both
myLib
and
myPlugin
use proper coroutines version
o
that doesn't change the answer
it's still transitive dependency version management
d
sure but its coming from
kotlinCompilerPluginClasspath
which i don't control
o
then how is it getting inside your dependencies
by that I mean the dependencies of your "custom task"
not the project dependencies in general
d
that is what i'm trying to figure out
old version of coroutines is pulled by compiler plugin classpath
e.g.
runtimeClasspath
and compile/default dependencies for projects are correct
o
you might just have to force it for that configuration then
d
wondering if i'm missing some configuration on my plugin
anyway thanks will look more into that tomorrow
ttyl