Might be getting nitpicky here, but android teams ...
# compose
c
Might be getting nitpicky here, but android teams compose bom is declared as:
Copy code
implementation(platform("...
while chris banes compose alpha bom is
Copy code
api(platform("...
As a gradle noob, is there one that's better than the other?
k
You need to use
api
with Chris’ solution, as
api
pulls exposes transitive dependencies - so that you can have access to compose’s libraries Edit for bad wording 🙈
i
implementation
or
api
only differ in what they expose to other modules, it has nothing to do with what it pulls in
For example, if you had a library module that used an
api
dependency, then your app module that depends on that library would automatically gain access to those dependencies, just as if it had declared all of those dependencies itself
If instead the library module used an
implementation
dependency, it is only an implementation detail (hence the name) and your app module wouldn't be able to use anything declared in that dependency at all unless it also declared its own, separate dependency