is it possible to publish android libraries with flavors? My initial test with jitpack that I usually use to publish libraries failed. Can anyone point me to a working example of a setup like this?
Got the flavors working locally inside one project - but publishing seems to be a problem.
Add your AAR or JAR as a dependency To use your Android library's code in another app module, proceed as follows: Navigate to File > Project Structure > Dependencies. In the Declared Dependencies tab, click and select Jar Dependency in the dropdown. In the Add Jar/Aar Dependency dialog, first enter the path to your .
TL;DR: If a library module includes a flavor dimension that the app flavor does not, then use missingDimensionStrategy to specify default flavors from the missing dimension. More generally, you can use this any time a consumed module includes a flavor that the consumer module does not.
Uploading Android AAR to Local Maven RepositoryCreate an empty project without any activity. Create an AAR module. The URL file:\\DESKTOP-3PCHU10\site\ is a shared folder. Add “apply from: 'maven-publish.
yes it's possible.
Jitpack essentially calls ./gradlew install
and then looks for artifacts.
The trick is to define the artifacts and then to know how to locate them.
Here's a sample project with multi-flavor-multi-project on jitpack: https://github.com/mirceanis/multi-flavor-lib-demo
There's a single-library functional sample in the single-lib branch
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With