Reputation: 1400
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:
pluginInfo
?Upvotes: 2
Views: 3083
Reputation: 14500
val pluginInfo by extra
is the notation you are looking for according to the documentationUpvotes: 3