Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19854

Trying to exclude Tests in one task and include in Another Task, But gradle always excludes irrespective of tasks

$
0
0

It seems that you don’t fully understand the Gradle lifecycle.

doFirst {
   compileTestJava.exclude("**/*abc*")
}

Here, you are “configuring” the compileTestJava task in the “execution” phase. The compileTestJava task has probably already executed by this stage so your configuration has no effect. See build phases.

I get the feeling you expect the compileTestJava task to run twice for a single build. A task will either run once or not at all for each gradle execution.


Viewing all articles
Browse latest Browse all 19854

Trending Articles