-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Support a primary entry point for bundles. #666
Conversation
dependencyAnalysis { | ||
dependencies { | ||
bundle('facade') { | ||
primary(':entry-point') |
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.
This is what the new API looks like in practice. Note that I haven't added an override to the bundle()
function, primarily due to limitations in Gradle that make it annoying to create domain objects with custom constructors.
* | | ||
* C -> used as API, part of bundle with B. Should not be declared! | ||
*/ | ||
internal class Bundles(private val dependencyUsages: Map<Coordinates, Set<Usage>>) { |
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.
Moved from elsewhere for easier testing.
val bundles = Bundles(dependencyUsages) | ||
|
||
// Handle bundles with primary entry points | ||
bundleRules.primaries.forEach { (name, primaryId) -> |
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.
Some ugly duplication here, but it works ™️
Resolves #662.