androidandroid-libraryandroid-flavors

publish android libraries with flavors


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.


Solution

  • 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