Open nedveed opened 2 weeks ago
I'm personally not interested in maintaining a KSP version right now. Perhaps once it moves into the Kotlin repo and KSP2 is stable we can reconsider.
The logic is really simple. Someone can maintain a KSP version outside the Retrofit repo until KSP is stable enough to move it in.
I see. I wasn't aware that KSP is not stable enough due to Google recommendation to migrate.
Kapt is now in maintenance mode, and we recommend migrating from kapt to KSP wherever possible. In most cases, this migration only requires changes to your project's build configuration. https://developer.android.com/build/migrate-to-ksp
In my case, in project with 15 endpoints, kapt task has ~7s while full release build has 4m30s, and it doesn't affect dev builds at all due to kaptRelease
, so maybe it's not that big deal as it isn't like generating some big Dagger graph and it's reasonable to wait for KSP2.
Separating your network layer into its on module will allow reducing that time to effectively 0, since it will always reuse the cached output rather than running on every change.
What kind of issue is this?
[ ] Question. This issue tracker is not the place for questions. If you want to ask how to do something, or to understand why something isn't working the way you expect it to, use Stack Overflow. https://stackoverflow.com/questions/tagged/retrofit
[ ] Bug report. If you’ve found a bug, spend the time to write a failing test. Bugs with tests get fixed. Here’s an example: https://gist.github.com/swankjesse/6608b4713ad80988cdc9
[x] Feature Request. Start by telling us what problem you’re trying to solve. Often a solution already exists! Don’t send pull requests to implement new features without first getting our support. Sometimes we leave features out on purpose to keep the project small.
I wish there was support for KSP annotation processor for retrofit-response-type-keeper.
Also it would be great to improve retrofit's Readme, R8 / ProGuard section and mention problem https://github.com/square/retrofit/issues/4011#issuecomment-1862037707 with showing that retrofit-response-type-keeper exists
Some story for background:
I had today problem described
My build config is
Working solutions for problem are two:
-keep, allowobfuscation, allowoptimization, allowaccessmodification @kotlinx.serialization.Serializable class *
retrofit-response-type-keeper is doing great job and is working fine, but for it to work I needed to add kapt plugin when all other processors (in my case it was hilt, room) support ksp.