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

core-ktx dependency is needed in generated code #122

Open
twyatt opened this issue Jun 24, 2022 · 2 comments
Open

core-ktx dependency is needed in generated code #122

twyatt opened this issue Jun 24, 2022 · 2 comments

Comments

@twyatt
Copy link
Member

twyatt commented Jun 24, 2022

When someone is using Exercise, it will generate code that uses bundleOf (androidx.core.os.bundleOf).

When setting up Exercise, library consumers will commonly use the following Gradle configuration:

implementation("com.juul.exercise:annotations:$version")
ksp("com.juul.exercise:compile:$version")

Unfortunately, the generated code will not compile if the core-ktx dependency is not manually pulled in, as annotations module does not define core-ktx as api (nor should it do so).

Not sure the best approach to getting core-ktx pulled in, aside from either instructing that consumers pull in core-ktx manually or pull in an Exercise module that has core-ktx as api.

@cedrickcooke
Copy link
Collaborator

As an alternative, might make sense to include our own copy of bundleOf -- it'll bloat the binary size a tiny, tiny bit but solve the configuration issue cleanly.

@twyatt
Copy link
Member Author

twyatt commented May 17, 2023

Does impose more maintenance burden on this library to maintain our own copy of bundleOf, but I can't think of a better solution.

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

No branches or pull requests

2 participants