Plugin development abstract class and property

In the Gradle User Manual, in the description of how to write tasks, the task and properties are concrete. When Incremental Tasks are introduced the IncrementalReverseTask example is abstract except for the TaskAction.
What is the semantic for this?

The feature for generating the implementation of properties is called “managed properties” and is documented in the user manual.

1 Like

I think I see what was confusing to me.
They are called “managed properties” but it appears to be the case that in order to have a single manged property then all of the properties of the class must be managed. Hence to my mind calling it a “managed class” or “managed type” makes more sense.

You can have a mix of managed and non-managed properties in a class. For example, this works:

abstract class MyTask extends DefaultTask {
    abstract RegularFileProperty getManagedInputFile()

    RegularFileProperty unmanagedInputFile = project.objects.fileProperty()

1 Like

If the task has such an unmanaged property would that mean it is not a “managed type”?
And if so, what are the implications?

Managed types

A managed type is an abstract class or interface with no fields and whose properties are all managed. That is, it is a type whose state is entirely managed by Gradle.

Yes, that means that the task is not a managed type any more. That means that you won’t be able to use the type in some locations. For task types, it currently makes no difference.