I get this unhelpful error saying "Plugin request for plugin already on the classpath must not include a version". If I remove the version number from the child project I get " Plugin [id: 'org.jetbrains.kotlin.jvm'] was not found in any of the following sources:"
So how do I plugin Kotlin across multiple modules without that version number clashing?
t
tddmonkey
03/06/2019, 9:31 PM
I believe what you should do (and 100% works for us), is declare but not apply the plugin in the root, like this:
Copy code
plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.20" apply false
}
Then in your child module just
apply plugin: 'kotlin'
n
Nikky
03/07/2019, 11:49 AM
you can also add the plugin child modules by leaving out the version
Copy code
plugins [
kotlin("jvm")
}
on the children
its silly, it should realize that it is the same version and just apply it
t
thomasnield
03/07/2019, 3:24 PM
@tddmonkey Is there a way to do that with Kotlin DSL?
t
tddmonkey
03/07/2019, 3:25 PM
There should be, but I use the Groovy one so can’t help. I’ll check if some of our other projects do it