[RESOLVED] How to make a task depend on project evaluation

So I’ve been kind of poking at the Gradle engine, probably in the wrong way, trying to find a way to force a task to depend on a successfull project evaluation. Is there a way to do that?

define ‘successful project evaluation’

No tasks will run if the gradle project fails configuration, if that’s what you mean

Can you give a concrete example of what your task is dependent upon?

You can use Task.dependsOn(…) to specify a dependency on a Task, Configuration, Buildable etc, etc.

There’s also Project.evaluationDependsOn(…) for when a dependant project must evaluate before the current project

Actually I found out how to force my task to be executed after the evaluation. It’s funny, even.

@Override
public void apply(Project project) {
    project.afterEvaluate( proj -> {
        TaskContainer tasks = project.getTasks();
        tasks.create(TheTask.GRADLE_TASKNAME, TheTask.class).configure();
    });
}