-
Notifications
You must be signed in to change notification settings - Fork 984
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
Conversation
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.
There was a problem hiding this 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" |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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.
related to #4523