handle it with gradle flavors
productFlavors {
roma {
applicationId "com.company.smartcity.roma"
resValue("string", "app_name", "roma")
versionCode 33
versionName "$googlePlayVersion"
manifestPlaceholders = [facebookId: "***************"]
}
praga {
applicationId "com.company.smartcity.praga"
resValue("string", "app_name", "praga")
versionCode 20
versionName "$googlePlayVersion"
manifestPlaceholders = [facebookId: "***************"]
}
budapest {
applicationId "com.company.smartcity.budapest"
resValue("string", "app_name", "budapest")
versionCode 8
versionName "$googlePlayVersion"
manifestPlaceholders = [facebookId: "***************"]
}
}
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (BuildConfigHelper.isRomaFlavor()) {
addNewsToDrawer()
}
}
}
Gamification.Builder()
.with(app)
.httpClient(client) //endpoint and interceptors configured
.database(dbName) //realm file name
.notificationHandler(fcmHandler)
.specialOffersHandler(offersHandler)
.build();
include ':app', ':gamification'
dependencies {
(....)
compile project(':gamification')
}
ext {
def RxJava2Version = '2.0.6'
def RxAndroid2Version = '2.0.1'
def Retrofit2Version = '2.3.0'
def OkHttp3Version = '3.8.0'
rxJava2Dependencies = [
rxJava : "io.reactivex.rxjava2:rxjava:${RxJava2Version}",
rxAndroid: "io.reactivex.rxjava2:rxandroid:${RxAndroid2Version}"
]
retrofit2Dependencies = [
retrofit : "com.squareup.retrofit2:retrofit:${Retrofit2Version}",
retrofitRxJavaAdapter: "com.squareup.retrofit2:adapter-rxjava2:${Retrofit2Version}",
okhttp : "com.squareup.okhttp3:okhttp:${OkHttp3Version}",
okHttpLogging : "com.squareup.okhttp3:logging-interceptor:${OkHttp3Version}",
gsonConverter : "com.squareup.retrofit2:converter-gson:${Retrofit2Version}"
]
}
apply from: 'dependencies.gradle'
compile rxJava2Dependencies.values()
testCompile jUnitDependencies.values() //only test builds
compile supportDependencies.values() //compile for all
flavorOneCompile gameDependencies.values() //compile in flavor build
flavorOneCompile newsDependencies.values()
flavorTwoCompile newsDependencies.values()
provided codeGenerationTools.values()
At Sointeractive we use RAML (Rest Api Modelling Language)
https://github.com/isaacloud/local-api
dependencies{
compile "com.yourcompany.modules:gamification:1.0.2"
compile "com.yourcompany.modules:news:1.2.4"
}
https://www.jfrog.com/open-source/
But they actually can convince users to download another app