gradle-release icon indicating copy to clipboard operation
gradle-release copied to clipboard

Document how to depend on release task itself

Open danez opened this issue 10 years ago • 1 comments

using

release.dependsOn clean

throws error

Cannot cast object 'task ':clean'' with class 'CleanTask_Decorated' to class 'groovy.lang.Closure'

instead use

project.tasks.release.dependsOn clean

This happens because release now resolves to the extension (the configuration) instead of the task, as both are named the same.

danez avatar Jun 05 '15 15:06 danez

I just ran into the same issue using

  • Gradle 6.2
  • gradle-release Plugin 2.8.1

Thanks for your Plugin, it really helps!

danieldietrich avatar Apr 21 '20 00:04 danieldietrich