eygraber
06/23/2025, 6:22 PMpublishAllLibraryVariants
with the deprecation message saying:
Publishing all Android Variants implicitly is not recommendedCalling
publishAllLibraryVariants
is not implicit, it is explicit, and I am explicitly saying I want all variants published. I don't want to have to specify each variant that I want published (especially when I have lots of flavors).
Furthermore, the doc for publishLibraryVariants
says:
If set to null, which can also be done with publishAllLibraryVariants, all library variants will be published, but not test or application variants.
tapchicoma
06/23/2025, 7:39 PMThis approach is not recommended now, as it can cause problems with variant resolution, especially when multiple flavors and build types are used. Use thefunction, which specifies build variants, instead.publishLibraryVariants()
tapchicoma
06/23/2025, 7:40 PMtapchicoma
06/23/2025, 7:49 PMeygraber
06/23/2025, 7:52 PMtapchicoma
06/23/2025, 7:55 PMeygraber
06/23/2025, 8:00 PMpublishAllLibraryVariants()
, used that, and never looked at it again (until now)Anton Lakotka [JB]
06/23/2025, 8:18 PMeygraber
06/23/2025, 8:44 PMpublishing {
multipleVariants {
allVariants()
withJavadocJar()
withSourcesJar()
}
}