Possible to add implicite task to project?


(Mårten Hedborg) #1

Is there any way to add a implicite task (such as “projects” or “dependencyInsight”) to a project ?

I would like to do something like this…

class CustumPlugin implements Plugin<Project> {
    void apply(Project project) {
        ((ProjectInternal) project).implicitTasks.add("sayHello", SayHelloTask.class)
    }
}

(Peter Niederwieser) #2

What’s your goal with this (compared to adding a regular task)?


(Mårten Hedborg) #3

I would like to create some sort of “about” task that prints out information (for example contact and version information) about a custom made plugin and the project it’s applied on.

I would like to be able to run the “about” task on any project in my hierarchical multi project structure and only display the information once and only for that specific project.