android studio - Computed resValue from buildType and flavor -
my application composed of 3 build types: dev, stage , release. , 2 flavors: p2p , pro.
in build.gradle utilize resvalue define, each build type, scheme use:
custom_url_dev custom_url_stage custom_url_prodi configure scheme flavor. like:
custom_url_pro_dev custom_url_p2p_dev custom_url_pro_stage custom_url_p2p_stage custom_url_pro_prod custom_url_p2p_prodso basically, need compute resvalue current build type , current flavor. possible gradle? or there improve way result?
it more cumbersome, think you'll need type+flavor-specific resource files, , you'll customize in each individual file. directory construction this:
src main p2pdev res values strings.xml prodev res values strings.xml p2pstage res values strings.xml ...
android-studio android-gradle build.gradle android-productflavors
No comments:
Post a Comment