Hello, people! ```abstract class ExtractOpenApiSc...
# community-support
i
Hello, people!
Copy code
abstract class ExtractOpenApiSchemasTask : DefaultTask() {
    @get:Input
    abstract val schemaJsonPostfix: Property<String>

    init {
        schemaJsonPostfix.convention(".schema.json")
    }

    //...
}
Is it the right way to set a default value for the
schemaJsonPostfix
? (I am asking because I get a warning from the IntelliJ on the line inside the init-block: "Accessing non-final property schemaJsonPostfix in constructor")
👋 1
n
I tend to leave the convention configuration over to the plugin that actually creates the extension. If ever you want to create multiple instances of the extension, you can adjust conventions as needed.
1
☝️ 1
in this specific case it will work in current implementations because of how Gradle generates the decorated classes, but Niels' suggestion is recommended
i
Thanks!