-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Use the official Kotlin Serialization converter from Retrofit and remove references to Moshi #20
Use the official Kotlin Serialization converter from Retrofit and remove references to Moshi #20
Conversation
gradle/libs.versions.toml
Outdated
@@ -70,10 +68,10 @@ hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hil | |||
hilt-testing = { module = "com.google.dagger:hilt-android-testing", version.ref = "hilt" } | |||
sandwich = { module = "com.github.skydoves:sandwich-retrofit", version.ref = "sandwich" } | |||
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } | |||
retrofit-kotlin-serialization = { group = "com.jakewharton.retrofit", name = "retrofit2-kotlinx-serialization-converter", version.ref = "retrofitKotlinxSerializationJson" } | |||
okhttp-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okHttp" } | |||
retrofit-kotlinSerialization = { module = "com.squareup.retrofit2:converter-kotlinx-serialization", version.ref = "retrofit" } |
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.
retrofit-kotlin-serialization is better in terms of clarity and per the naming convention
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.
There are different conventions, one of them is that the dash should only be used to separate sub-components and each component name should be camelCase. But I understand you prefer no camel case at all so I'll revert the changes.
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.
Also note that the versions section currently use camel case for some components so it's kind of a mix.
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.
yes my bad is suppose to be retrofit-kotlinx-Serialization
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.
should I replace all kotlin-serialization
references to kotlinx-serialization
?
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.
That would be really good
gradle/libs.versions.toml
Outdated
@@ -108,4 +106,4 @@ hilt-plugin = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } | |||
baselineprofile = { id = "androidx.baselineprofile", version.ref = "baselineprofile" } | |||
|
|||
[bundles] | |||
retrofitBundle = ["retrofit", "retrofit-kotlin-serialization", "okhttp-interceptor", "okhttp-mockserver"] | |||
retrofit = ["retrofit", "retrofit-kotlinSerialization", "okhttp-loggingInterceptor"] |
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.
retofitBundle makes it easier to understand at a glance which dependencies are grouped together.
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.
and correct as per naming convention for bundles
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 thought it was redundant because it's already part of the bundle namespace:
bundle.retrofitBundle
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.
for code readability is easy to know that it bundled
For some reason Spotless believes that |
@cbeyls rebase pull and run |
…ove remaining references to Moshi
…reating a "kotlin" subcomponent
…pendency - rename some dependencies to be more explicit about what they are. - replace deprecated call to project.buildDir
…nd use dashes instead of camel case for dependency component names.
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.
This is fantastic!! Nicely done, @cbeyls and @FreedomChuks 🙌 🙌
Thank you for your valuable contribution.
🎯 Goal
Remove a deprecated dependency and fix comments and documentation to reflect the actual libraries used in the project.
🛠 Implementation details
project.buildDir
in AndroidCompose convention plugin.