Undeploy tasks dependencies deployments

I’m using cargo gradle plugin. I’m facing up how to deal with my undeployDev-like tasks.

This is my configuration:

remoteContainers.each { config ->
	task "undeployDev${config.name.capitalize()}"(type: com.bmuschko.gradle.cargo.tasks.remote.CargoUndeployRemote) {
      	description = "Deploys WAR to remote Web Application Server: '${config.name}'."
       	containerId = config.container
       	hostname = config.hostname
	port = config.port
       	username = config.username
        password = config.password
        dependsOn = [createDevelopmentWar]
	deployables = [new com.bmuschko.gradle.cargo.convention.Deployable(file: createDevelopmentWar.archivePath, context: 'commty')]
    }
}

As you can see on my undeployDev-like task, it depends on another task createDevelopmentWar. So I don’t want each time I need to undeploy the artifact, it needs to regenerate the deployable. I’d like to set which context the task need to undeploy without any other dependency.

I’ve took a look on documentation, nevertheless, I don’t quite figure what would I need to do…

I responded on your question on GitHub: https://github.com/bmuschko/gradle-cargo-plugin/issues/164. Please try to avoid double-posting.