I am trying to migrate a build.gradle to build.gradle.kts and am stuck with this error:
Line 036: ext.pluginInfo.licenses = ["Apache-2.0"]
^ Unresolved reference: pluginInfo
The original build.gradle "includes" another script and then references pluginInfo from that script:
apply from: "rubyUtils.gradle"
pluginInfo.licenses = ["Apache-2.0"]
This is the (shortened) part from rubyUtils.gradle that provides pluginInfo (I guess):
ext {
pluginInfo = new PluginInfo()
}
Here is what I have come up with in Kotlin. This causes the error mentioned at the beginning:
apply(from = "rubyUtils.gradle")
ext.pluginInfo.licenses = ["Apache-2.0"]
Questions:
- Is it possible at all to "import" a Groovy Gradle script in a Kotlin script (apply a Groovy script plugin in a Kotlin script)?
- If it is possible: How do I correctly refer to
pluginInfo? - And what is that whole "ext" thing anyway? :-)