Sourabh Rawat
11/24/2020, 5:20 PMephemient
11/24/2020, 5:27 PM@Inject
or access it through project.objects
Vampire
11/24/2020, 6:39 PMephemient
11/24/2020, 6:44 PMval foo = objects.property<String>().apply { set("default") }
that still need ObjectFactory
thoughVampire
11/24/2020, 6:46 PMobjects.property<String>().convention("default")
?
Defaults could also be set by a plugin or in the constructor / init function.
But yes, that is a valid use-case of course 🙂Sourabh Rawat
11/24/2020, 6:50 PMobjects.property<String>()
but objects.property(String::class.java).apply { set("") }
is available.Sourabh Rawat
11/24/2020, 6:51 PMconvention
is Incubating feature right now. Should I use it it production code?Vampire
11/24/2020, 6:57 PMVampire
11/24/2020, 6:58 PMorg.gradle.dsl.property
or something like that.Vampire
11/24/2020, 7:00 PM.kotlin
mazorius
11/25/2020, 8:18 AMkotlin("jvm")
instead of kotlin-dsl
plugin.
You definitively need the kotlin-dsl
plugin for this: Kotlin DSL Plugin
This will add Kotlin, the Gradle Java Plugin, and many more needed configuration.Sourabh Rawat
11/25/2020, 8:26 AMSourabh Rawat
11/25/2020, 6:53 PMmazorius
11/25/2020, 8:41 PM.value()
is fine for you. Don’t know if this is incubating as well.Vampire
11/25/2020, 9:00 PMVampire
11/25/2020, 9:03 PM