I have the following code which works correctly:
allprojects { Project project →
project.tasks.whenTaskAdded { Task task →
if(task instanceof Tar){
throw new GradleException(“Not allowed to use Tar task type: ${task.name}”)
}
} }
If the GradleException is thrown, the error message looks like this:
Failed to notify action.
Not allowed to use Tar task type: jar
What does the outter exception mean (which is wrapping my exception)?
Thanks and regards, Etienne