0

I have developed an app with Android Studio. Recently the product owner has the need to deploy different apps with different app names, app icons and themes. The apps will do exactly the same with different branding so they will share almost all code.

I was going to automate the deploy builds with gradle scripts but I have realized that the package should be different for each app.

Can I deploy these apps to Google Play using only one project? Can I change the package name for each deploy?

crubio
  • 6,394
  • 4
  • 30
  • 33

1 Answers1

3

As Ken Wolf pointed out, with Gradle, when using build variants, the build system enables you to uniquely identify different packages for each product flavors and build types.

The application ID in the build type can be added as a suffix to those specified for the product flavors:

    productFlavors {
        pro {
            applicationId = "com.example.my.pkg.pro"
        }
        free {
            applicationId = "com.example.my.pkg.free"
        }
    }

    buildTypes {
        debug {
            applicationIdSuffix ".debug"
        }
    }
    ....

More info: http://developer.android.com/intl/es/tools/building/configuring-gradle.html

crubio
  • 6,394
  • 4
  • 30
  • 33
  • But It is generating multiple signed APK so,how can it possible in Single APK. – Vasant May 28 '18 at 14:53
  • @Vasant please ask your question in a different thread. The objective here is to develop multiple apps with one single project. – crubio May 29 '18 at 15:34