I've convert my android project build from (maven) to Gradle.
Old Project Struct Was
Android Lib Project (as apklib)
Andlrid Template build Project (use the above anroid Lib project as a dependency)
I'm using the Jenkins CI to build and release the apk for different clients. only thing i need to have a different package name for each apk. so i used the
<renameManifestPackage>${app.pkg.name}</renameManifestPackage>
and passing this "app.pkg.name" from jenkin as a property.
My problem is how do can i achieve the same with gradle.
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "myapp.myappbasetemplate"
minSdkVersion 15
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
signingConfigs {
debug {
storeFile file("debug.keystore")
}
release {
storeFile file("../keystore/myproject.keystore.")
storePassword "*******"
keyAlias "check"
keyPassword "********"
}
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
debuggable false
zipAlign true
}
}
productFlavors {
festival {
packageName "${newPackageName}"
versionCode 20
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
0 comments:
Post a Comment