How to get which tasks are passed via command line? (continued)

@Rene How to get which tasks are passed via command line? gives a good example, but it doesn’t work if shortcuts are used, i.e. gradlew aD to call assembleDebug. Is there a way to get the resolved ones? In case of aD it actually resolves to :app:assembleDebug in a common Android project.

1 Like

Example use case:

// if this is the only task being requested by the user, fail the build on failures
task.ignoreFailures = task.project.gradle.startParameter.taskNames != [ task.path ]