Here's my main project structure:
App/src
- main
- flavor1
- flavor2
- dimension1
- dimension2
- debug
- release
Both flavor* and dimension* are flavor dimensions. The build variants are:
flavor1Dimension1Debug
flavor1Dimension2Debug
flavor2Dimension1Debug
...
And library's dir structure:
Lib/src
- main
- flavor2
- DebugInterceptor.java
- debug
- DebugInterceptor.java
- release
- DebugInterceptor.java
What I want:
src/flavor2/DebugInterceptor.java
. It should take higher priority than build types. You can assume that these three dirs(flavor2, debug, release) contain only one file DebugInterceptor.java
How can I configure gradle to achieve this?
use only one dimension and multiple flavor, don't use multiple dimension or remove code from dimension, dimension is not suitable for code but for other configs like api level
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.