BreadMoirai / github-release-gradle-plugin

A Gradle Plugin to send Releases to Github
Apache License 2.0
108 stars 26 forks source link

Update to OkHttp 4.x #36

Closed fondesa closed 2 years ago

fondesa commented 4 years ago

Currently, this plugin depends on the version 3.8.1 of OkHttp. Not all the methods in OkHttp 4.x are backwards-compatible with the version 3.x. If this plugin is used as implementation in :buildSrc and OkHttp 4.x is transitively brought in, the other dependencies may break if they use a backwards-incompatible API.

Currently, I'm forcing this plugin to use the version 4.x.

e.g.

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        if (details.requested.group == "com.squareup.okhttp3" && details.requested.name == "okhttp") {
            details.useVersion "4.0.0"
            details.because "Fixes \"com.github.breadmoirai:github-release\" since it doesn't depend on OkHttp 4."
        }
    }
}
yschimke commented 3 years ago

This 307 redirect handling should be fixed in recent OkHttp versions, see this PR https://github.com/square/okhttp/pull/5990/files