Gradle: Force Custom Task to always run (no cache)

You can achieve this by setting outputs.upToDateWhen { false } on the task.

This can be performed in your build.gradle file:

handleManagementArchive.outputs.upToDateWhen { false }

It can also be done in the constructor of your custom task.

ResolveProjectArchiveDependency() {
    outputs.upToDateWhen { false }
}

Leave a Comment

File not found.