Question: given that you declare tasks as `abstrac...
# plugin-development
k
Question: given that you declare tasks as
abstract
so that Gradle can subclass them, is there any kind of annotation or other mechanism that says "cannot be subclassed, except by Gradle"?
v
Why should you want to do that?
Also, you don't need to make the class abstract. It just saves you a ton of boilerplate code. But you can also inject
ObjectFactory
and set the priorities and so on.
a
Do you want to mark a class as 'do not subclass' for 'self documenting code' reasons, or to prevent plugin users from implementing your class? Or something else?