SamsetDev / ProductFlavors

Product Flavore to saparate and maintain code reusibility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ProductFlavors

Setting up Flavors in build.gradle

productFlavors {

    staging {
        dimension "version"
        applicationId "in.samset.androidflavorsample.statging"

        //Configure this flavor specific app name published in Play Store
        resValue "string", "flavored_app_name", "Staging App"


    }
    prod {
        dimension "version"
        applicationId "in.samset.androidflavorsample.prod"

        //Configure this flavor specific app name published in Play Store
        resValue "string", "flavored_app_name", "Prod App"

    }
}

Application Id

Each flavor can have its own application Id. An 'applicationId' makes a app in Play Store unique. In this example, the free version will be published on Play Store with packageId/applicationId as n.samset.androidflavorsample.statgingand paid one will have in.samset.androidflavorsample.prod

About

Product Flavore to saparate and maintain code reusibility

License:Apache License 2.0


Languages

Language:Java 100.0%