1

I recently started implementing Gradle release plugin. I have been through https://github.com/researchgate/gradle-release#custom-release-steps.

The plug-in is updating SNAPSHOT version to Release version, updating the current SNAPSHOT version to next version. Also gradle release task is executing compile, build steps. I automated this in Jenkins. I tried "buildTasks = []" but still build task has been executed. I couldn't find documentation on this. Please help.

FYI: I have separate jenkins job that only builds my project. I created new Jenkins job for release task. For release task I don't want compile, build tasks.

Regards

Sudhir

sudhir
  • 219
  • 5
  • 17
  • You should at least do the check in the build task or compile to check for errors. Why you don't want to have any build done for release version creation? Don't really get it sorry. – Hillkorn Apr 21 '18 at 13:47
  • @Hillkorn Build is done through another Jenkins Job. This is the reason why I don't to have another build step for release version. I just need to bump up to release version. I am not sure whether this is possible or not. If this can be done , it will be really helpful for me. – sudhir Apr 23 '18 at 14:09
  • @Hillkorn Could you please let me know how this can be done? – sudhir Apr 23 '18 at 16:47
  • Hm for me it seems to work with release.buildTasks = [] – Hillkorn Apr 24 '18 at 18:35

1 Answers1

3

buildTasks = [] works fine for me. No other gradle tasks were called.

release {
    ...
    tagTemplate = '${version}'
    versionPropertyFile = 'gradle.properties'
    buildTasks = []
    ...    
}
Yaroslav
  • 446
  • 4
  • 15