5

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.

ligi
  • 35,518
  • 37
  • 123
  • 220

1 Answers1

4

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

Mircea Nistor
  • 2,868
  • 24
  • 31