Write an AndroidManifest.xml file to be merged with app module's manifest.

This commit is contained in:
Aman Jain 2020-07-23 12:17:02 -04:00 committed by Fredia Huya-Kouadio
parent a323a1eacd
commit 452af201b0
4 changed files with 153 additions and 7 deletions

View file

@ -94,6 +94,8 @@ android {
// Feel free to modify the application id to your own.
applicationId getExportPackageName()
versionCode getExportVersionCode()
versionName getExportVersionName()
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
//CHUNK_ANDROID_DEFAULTCONFIG_BEGIN

View file

@ -28,6 +28,22 @@ ext.getExportPackageName = { ->
return appId
}
ext.getExportVersionCode = { ->
String versionCode = project.hasProperty("export_version_code") ? project.property("export_version_code") : ""
if (versionCode == null || versionCode.isEmpty()) {
versionCode = "1"
}
return Integer.parseInt(versionCode)
}
ext.getExportVersionName = { ->
String versionName = project.hasProperty("export_version_name") ? project.property("export_version_name") : ""
if (versionName == null || versionName.isEmpty()) {
versionName = "1.0"
}
return versionName
}
final String PLUGIN_VALUE_SEPARATOR_REGEX = "\\|"
/**