Reputation: 31
I'm developing one of my first Android apps. I come from an ASP.NET world where it's trivial to have separate Web.config files for dev, test, and production. Does anyone have a good, automated way of doing this for Android via Eclipse?
Upvotes: 3
Views: 1462
Reputation: 81
I know question is late, but I will answer.
For have separate build for 'dev', 'test', 'production' you may use Gradle.
In build.gradle file you may define separate buildTypes
like this:
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
versionNameSuffix "r"
}
debug {
versionNameSuffix "d"
debuggable true
}
test {
applicationIdSuffix ".test"
versionNameSuffix "t"
debuggable false
}
The above snippet achieves the following:
versionNameSuffix
to refer to the version string which is buildapplicationIdSuffix
for may install test and release build on one deviceFor more info go to http://tools.android.com/tech-docs/new-build-system/user-guide
Upvotes: 1
Reputation: 7385
Have a command line ant based build system that takes "dev", "test", "production" as parameters and copies in the appropriate xml files for the build. This assumes that you already have a set of xml/config files for them.
Upvotes: 1