researchgate / gradle-release

gradle-release is a plugin for providing a Maven-like release process for projects using Gradle
MIT License
859 stars 223 forks source link

Build failing after upgrading to 3.0.0 #363

Closed shantanuinamdar closed 2 years ago

shantanuinamdar commented 2 years ago

this is the reason

Cannot set the value of extension 'release' property 'pushReleaseVersionBranch' of type java.lang.String using an instance of type java.lang.Boolean.

it was working earlier with the same config for 'pushReleaseVersionBranch' as false tried with removing that configuration, then I see the other issue.

Cannot set the property 'requireBranch' because the backing field is final.

not sure what is changed in the latest version. pls suggest how to fix this issue?

blagerweij commented 2 years ago

I'm getting the same problems with the 3.0.0 version. Any update on this ?

Hillkorn commented 2 years ago

pushReleaseVersionBranch can be set to null instead. It will only push in case there is a branch name set.

Sorry for the delay. Have to check my notification settings as I didn't got any :disappointed:

Hillkorn commented 2 years ago

By default the pushReleaseVersionBranch is set to null which acts like false before. The issue with requireBranch you have is that it's not a plain String field anymore but a gradle property (please read https://docs.gradle.org/current/userguide/lazy_configuration.html for more information on this) and you can set it like this

release {
    git {
        requireBranch.set('main')
    }
}