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

How to get custom task to run after a default task?

$
0
0

Your task has no task action, the exec call is executed during configuration phase. Furthermore, the mustRunAfter is superfluous because dependsOn is much stronger. This is maybe what you want:

tasks.register("hello") {
    dependsOn("wrapper")
    doLast {
        exec {
            commandLine("ls")
        }
    }
}

Gradle Build Lifecycle


Viewing all articles
Browse latest Browse all 20468

Latest Images

Trending Articles



Latest Images