DanielMartinus / Konfetti

Celebrate more with this lightweight confetti particle system 🎊
ISC License
3.13k stars 299 forks source link

Depend on library projects rather than published artifacts #290

Closed PaulKlauser closed 2 years ago

PaulKlauser commented 2 years ago

This allows the sample apps to be used to test changes to the libraries without needing to publish

PaulKlauser commented 2 years ago

I found this to make contributing to this repo easier 😃 Let me know if there's an unintended side-effect to this that I'm not considering.

DanielMartinus commented 2 years ago

Hey @PaulKlauser, thanks for your contribution. Unfortunately this won't work since the api included library won't be included when building the konfetti-xml or konfetti-compose. Still have to work on a solution for that

PaulKlauser commented 2 years ago

Closing, since this won't actually work when publishing the library's aar

PaulKlauser commented 2 years ago

@DanielMartinus it actually looks like maven-publish will generate the POM to point at the published dependency, even if the gradle file is pointed at the local project dependency. I can see this behavior by running ./gradlew konfetti:xml:generatePomFileForReleasePublication and looking at the output POM file.

Looks like the issue is just that the artifactId is named core instead of konfetti-core, which is what the core module is being published to so it ends up not matching.

The solution would be to set the project name explicitly to konfetti-core which can be done by changing the directory name, or adding a line to the settings.gradle, which I'll add to this PR in a second

DanielMartinus commented 2 years ago

See #295 with a setup that works using the local core library and where publishing used the remote core dependency