rrader
rrader

Reputation: 361

Check is task will run in Gradle

gradlew update test

How to check if "test" task is present in list? I need this for "update" task, it read a file from resources if "test" will be and another file if "test" will not be.

Upvotes: 2

Views: 1260

Answers (1)

lance-java
lance-java

Reputation: 28099

You can check gradle.taskGraph.hasTask("test")

@see TaskExecutionGraph

Upvotes: 5

Related Questions