-
Notifications
You must be signed in to change notification settings - Fork 301
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
Depend on library projects rather than published artifacts #290
Depend on library projects rather than published artifacts #290
Conversation
This allows the sample apps to be used to test changes to the libraries without needing to publish
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. |
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 |
konfetti/xml/build.gradle
Outdated
@@ -52,7 +52,7 @@ android { | |||
} | |||
|
|||
dependencies { | |||
api 'nl.dionsegijn:konfetti-core:2.0.1' | |||
api project(':konfetti:core') |
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.
@DanielMartinus per your comment about the api project not being included: makes sense, if we make this api project(':konfetti:core')
, that would solve it right?
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.
Unfortunately transitive dependencies don't work great when building an aar
. Aar only includes the files of that particular module. It's able to use other modules to compile but unfortunately not able to expose files from other transitive modules. Either you'll have to use fat aar
to create an aar or pull in the transitive dependency externally like I do now. I agree that the current setup is suboptimal. I'm going to dive into merging all the modules again and separate the internal code by package which seems to me a bit of an improvement. It'll make it easier for external contributions and publishing new releases.
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.
Ah right. Will bringing Compose into the library have any unintended side-effects for devs that aren't using Compose?
Closing, since this won't actually work when publishing the library's aar |
@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 Looks like the issue is just that the artifactId is named The solution would be to set the project name explicitly to |
See #295 with a setup that works using the local core library and where publishing used the remote core dependency |
This allows the sample apps to be used to test changes to the libraries without needing to publish