I know we can build different flavor apks with different resources by creating different directory within src, but now I want to make some java code customized, is that possible? Or any other ways to do it?
update
I have a project with 100 *.java files, and I have 10 flavors, but each flavor has only one file is customized and the file in each flavor is not the same file, so I have to put that 10 files in each flavor, and once a file in that 10 files is modified, I will have to modify the same file in other flavors, the project is like:
+ App
|- src
|- main
|- java
|- path
|- A.java(can't be here)
|- B.java(can't be here)
|- C.java(can't be here)
|- D.java(can't be here)
|- E.java(can't be here)
|- F.java(can't be here)
|- G.java(can't be here)
|- Others.java
+ res
|- flavorA
|- java
|- path
|- A.java(customized)
|- B.java
|- C.java
|- D.java
|- E.java
|- F.java
|- G.java
+ res
|- flavorB
|- java
|- path
|- A.java
|- B.java(customized)
|- C.java
|- D.java
|- E.java
|- F.java
|- G.java
+ res
|- flavorC
|- java
|- path
|- A.java
|- B.java
|- C.java(customized)
|- D.java
|- E.java
|- F.java
|- G.java
+ res
|- flavorD
|- java
|- path
|- A.java
|- B.java
|- C.java
|- D.java(customized)
|- E.java
|- F.java
|- G.java
+ res
|- flavorE
|- java
|- path
|- A.java
|- B.java
|- C.java
|- D.java
|- E.java(customized)
|- F.java
|- G.java
+ res
|- flavorF
|- java
|- path
|- A.java
|- B.java
|- C.java
|- D.java
|- E.java
|- F.java(customized)
|- G.java
+ res
|- flavorG
|- java
|- path
|- A.java
|- B.java
|- C.java
|- D.java
|- E.java
|- F.java
|- G.java(customized)
+ res