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

Deprecate KspTask.commandLineArgumentProviders. #1246

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ting-yuan
Copy link
Collaborator

KSP will delegate task creation to KGP and drop support of the per-task commandLineArgumentProviders.

KSP will delegate task creation to KGP and drop support of the per-task
commandLineArgumentProviders.
@ting-yuan
Copy link
Collaborator Author

Hello @cdsap, we are replacing the hacky KspTask, which inherits and overrides internal implementations in kotlin-gradle-plugin, with tasks created by public APIs in kotlin-gradle-plugin-api. Because there will be no longer commandLineArgumentProviders property, projects relying on it will be affected. May I know your use cases and see how we can find a mitigation?

@cdsap
Copy link
Contributor

cdsap commented Dec 20, 2022

hi @ting-yuan, thanks for the heads up. It makes sense.

The main use case is the Ksp implementation of the RoomWorkaround for Android Cache fix plugin.
Room with Ksp has the same issue as Kapt(#861). We use commandLineArgumentProviders to add a variant-specific output of the room schema for the task. This task is currently in progress but we can discuss different options.

How looks the new approach?

@runningcode
Copy link
Contributor

runningcode commented Dec 20, 2022

I think this is the main use case from the Google documentation: https://developer.android.com/training/data-storage/room/migrating-db-versions#export-schemas

There needs to be an alternative way to provide task specific inputs and outputs to the annotation processor arguments. The deprecation warning should point to this.

DeepLinkDispatch also requires using a CommandLineArugmentProvider to prevent overlapping outputs: https://github.com/airbnb/DeepLinkDispatch#generated-deep-links-documentation

@ting-yuan ting-yuan marked this pull request as draft January 6, 2023 07:19
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.

4 participants