The build.gradle.kts file looks like this…
plugins {
id ("cpp-application" )
id("maven-publish" )
}
group = "foo.bar"
version = "2019.3"
application {
baseName = "main"
}
I get the errors …
Line 12: baseName = "main"
^ Val cannot be reassigned
Line 12: baseName = "main"
^ Type mismatch: inferred type is String but Property<String!>! was expected
And sure enough the application.baseName is a Kotlin val .
My question is why can baseName be assigned/overrwritten in Groovy but not Kotlin?
Of course leaving baseName with its default value matching the project name is fine so this is not a big deal here.