After all git approach wasn't that right. Building multiple app instances (product flavours) with Gradle was just the right thing to do:
1) Specific files and resources per the instance of app
colors and strings are located in resource files: Project/module/src/instance_name/res/values/instance_name_cfg.xml
.
layouts are located in: Project/module/src/instance_name/res/layout/instance_name_cfg.xml
Java code is located in: Project/module/src/instance_name/java/package.name/MyClass.java
drawables (PNG images) are located in: Project/module/src/instance_name/res/drawable/
, ic_launcher images are in the same path only in different folders (drawable-hdpi,...)
Common files and resources are located in Project/module/src/main/
folder.
2) In the first picture there is the whole file structure.
Instances are in my case cities (Dammam, Jeddah, Prague, Reading). Screenshots are taken from Android Studio, where you can switch build variants (flavours) - at the bottom of the picture.
3) In the second picture there is a fragment of the build.gradle file.
Mixing app (instance) resources is quite powerful. As you can see in the picture below, resources, java files and even manifest files could be combined together in directive sourceSets. For example Dammam and Jeddah have the same java files, some common resources and specific resources per instance. Using name of instance (e.g. dammam) in sourceSets must precede declaration in directive productFlavours.