Pro Your skills of Gradle use in Android Studio


Download 323.31 Kb.
bet5/5
Sana18.06.2023
Hajmi323.31 Kb.
#1578235
1   2   3   4   5
minifyEnabled true
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
productFlavors
I face a serious issue while developing same apps on a different url like for production use this url, QA use this url, development and blah…. Blah… . Most of the time messes up with issue like using the url for QA to develop, development to production.
“ And you know what happen next to you :-/”
To resolve this issue we have productFlavors to overcome with this problem.
productFlavors {
development {
applicationId "xxx.xxxxxxx.xx"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 12
//client 2.0
versionName "1.83"
multiDexEnabled true
buildConfigField 'String', 'BASE_ULR_MAIN', '"http://baseip"'
}

qa {
applicationId "xxx.xxxxxxx.xx"


minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 12
//client 2.0
versionName "2.2"
buildConfigField 'String', 'BASE_ULR_MAIN', '"http://baseip"'

}

production {


applicationId "xxx.xxxxxxx.xx"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 12
//client 2.0
versionName "2.4"
multiDexEnabled true
buildConfigField 'String', 'BASE_ULR_MAIN', '"http://baseip"'

}
}
}
Download 323.31 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling