Custom plugin - extending Exec class

It might be better not to extend ‘Exec’ but to model your task’s API explicitly. In the task action you can then delegate to ‘project.exec’.

Instead of the convention object, you should use an extension object. (See the Gradle User Guide for more information.)

1 Like