Is it possible to change the default flavors root path?
From:
---src
-----main
-----flavor1
-----flavor2
-----flavor3
To:
---src
-----main
-----flavors
--------flavor1
--------flavor2
--------flavor3
And if you don't want to add a line into sourceSets every time you add a flavor you may use closure like this
productFlavors{
flavor1 {}
flavor2 {}
all { flavor ->
sourceSets[flavor.name].setRoot("src/flavors/${flavor.name}")
}
}
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