-
Notifications
You must be signed in to change notification settings - Fork 413
Migrate to KSP2 #379
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
base: master
Are you sure you want to change the base?
Migrate to KSP2 #379
Conversation
- Add namespace. - Configure java version. - Update Gradle.
Use the configureKsp function to initialize KSP.
KAPT does not add the parent class while KSP does
KSP shows values in different order than KAPT and it makes some tests to fail. Ensure we have the same output for all processors.
Type elements can become invalid after PSI changes so it's safer to query them when we need them.
Update also to a compatible Gradle version
Gradle versions higher than 8.14 require JDK 17, thus it makes jitpack to fail as it uses JDK 11 by default
elihart
left a comment
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 think this looks pretty good overall, thanks!
Since this PR is newer and seems complete I think we should take it over the earlier PR
| }?.annotationValues | ||
| ?.any { annotationValue -> | ||
| annotationValue.value.toString() == deepLinkParamType.toString() | ||
| annotationValue.value.toString() == deepLinkParamType.toAnnotationValue() |
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'm wondering if we can do this comparison in a safer way. I can try to explore it
| kotlinCompileTestingVersion : '0.6.0', | ||
| kspVersion : '2.0.21-1.0.28', | ||
| xProcessorVersion : '2.6.0-alpha01', | ||
| kotlinCompileTestingVersion : '0.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.
there is a newer release https://github.com/ZacSweers/kotlin-compile-testing/releases/tag/0.12.1
| kotlinCompileTestingVersion : '0.11.0', | |
| kotlinCompileTestingVersion : '0.12.1', |
| kspVersion : '2.0.21-1.0.28', | ||
| xProcessorVersion : '2.6.0-alpha01', | ||
| kotlinCompileTestingVersion : '0.11.0', | ||
| kspVersion : '2.3.3', |
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.
| kspVersion : '2.3.3', | |
| kspVersion : '2.3.4', |
| @@ -0,0 +1,2 @@ | |||
| jdk: | |||
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.
Can you explain this? I don't believe we use jitpack at all
Hi 👋
I've took some time to try to migrate the library to KSP2 with the help of Claude Code, as I didn't had much experience with KSP before.
My process was:
DeepLinkProcessor.DeepLinkProcessorto make the test pass.Everything looks good so far, but let me know is something should be changed.
This PR should fix #369
I saw there's another PR (#371) trying to update to KSP2, I'm not sure which one is better, but this one is up to date with the main branch and everything looks ready.
cc @rossbacher