Kelvin Chung
07/23/2024, 7:59 PMinterface MyDomainObject {
val isSomething: Property<Boolean>
}
and I am getting an error like
> Could not create an instance of type MyDomainObject
> Could not generate a decorated class for type MyDomainObject
> Cannot have abstract method MyDomainObject.isSomething()
This all has something to do with the fact that we have a property named isSomething, right?Martin
07/23/2024, 9:15 PMpublic abstract Property<Boolean> isSomething();
Gradle sees that it doesn’t return a boolean value and understands that as a method (instead of a property)Martin
07/23/2024, 9:16 PMis prefix it will work againMartin
07/23/2024, 9:17 PMThomas Broyer
07/24/2024, 8:02 AM@get:JvmName("getIsSomething") (or getSomething if you prefer), that would help with Groovy DSL while keeping the Kotlin DSL the same (with the is prefix).ephemient
07/24/2024, 4:32 PM