Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade to OkHttp 4.11.0 #4582

Merged
merged 7 commits into from Jan 18, 2024
Merged

Downgrade to OkHttp 4.11.0 #4582

merged 7 commits into from Jan 18, 2024

Conversation

marcingrzejszczak
Copy link
Contributor

related to #4523

shakuzen and others added 7 commits January 17, 2024 19:05
We were on alpha versions as a result of using `latest.release` and the alphas being published to Maven central. When migrating to the TOML version catalog we kept the version the same as before. This attempts to move us off the alpha versions onto GA versions. We should not depend on any new API introduced in 5.0 alphas.
The version of the Kotlin stdlib that gets transitively pulled in from 4.11.0 matches the version we had with the previous 5.0 alpha version (Kotlin 1.8). We want to keep this consistent for compatibility's sake. It will be more important in later branches where we have Kotlin-based integrations.
We were resolving unexpected or mixed versions of Kotlin libraries based on transitive dependencies. This strictly aligns the Kotlin versions used and adds a sample that verifies our Kotlin-related code can be used with the newest version of Kotlin supported while being compiled with the oldest version supported.
Copy link
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied some tests over to a sample module that builds with Kotlin 1.9 so we are checking our Kotlin-related code with the latest version supported while we compile against the oldest version we support (Kotlin 1.7)

@@ -58,7 +58,7 @@ mockito = "5.5.0"
mongo = "4.8.2"
netty = "4.1.104.Final"
newrelic-api = "5.14.0"
okhttp = "5.0.0-alpha.11" # TODO is compiling against an alpha version intentional?
okhttp = "4.11.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downgraded from 4.12.0 to 4.11.0. This better matches the 5.0 alpha we were compiling against in terms of Kotlin dependencies.

@@ -1,5 +1,5 @@
plugins {
id "org.jetbrains.kotlin.jvm" version "1.7.22"
alias(libs.plugins.kotlin17)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will continue using the same Kotlin plugin version. We don't want to upgrade the minor version in a maintenance release.

@@ -82,6 +82,7 @@ dependencies {
optionalApi 'io.micrometer:context-propagation'

// kotlin
optionalApi enforcedPlatform('org.jetbrains.kotlin:kotlin-bom')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistently enforces the kotlin library versions match the plugin version. Without enforcedPlatform, Gradle was resolving higher versions than we wanted.

@shakuzen shakuzen merged commit e111c98 into 1.10.x Jan 18, 2024
7 checks passed
@marcingrzejszczak marcingrzejszczak deleted the downgrade_okhttp branch January 18, 2024 13:19
@shakuzen shakuzen changed the title Downgraded OkHttp Downgrade to OkHttp 4.11.0 Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants