mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Move the versionCode and versionName into the gradle file.
Google itself says it is better to specify the versions in the gradle file: https://developer.android.com/studio/publish/versioning.html And it allow us the specify a specific versionCode by environment variable instead of by modifying files.
This commit is contained in:
parent
a0b4ed21a5
commit
a0e08c9cee
@ -188,6 +188,8 @@ android {
|
||||
buildConfigField "String", "ENFORCED_LANG", "\"\""
|
||||
resValue "string", "app_name", "Kiwix"
|
||||
resValue "string", "app_search_string", "Search Kiwix"
|
||||
versionCode 54
|
||||
versionName "2.3"
|
||||
}
|
||||
// Custom apps built from a json file, zim file and icon set
|
||||
map.each { name, directory ->
|
||||
@ -227,9 +229,22 @@ android {
|
||||
buildConfigField "String", "ZIM_FILE_NAME", "\"$filename\""
|
||||
long length = zimfile.length()
|
||||
buildConfigField "long", "ZIM_FILE_SIZE", "$length"
|
||||
if (parsedJson.content_version_code != null) {
|
||||
buildConfigField "int", "CONTENT_VERSION_CODE", "$parsedJson.content_version_code"
|
||||
if (project.hasProperty('version_code')) {
|
||||
def version_code = project.property('version_code')
|
||||
versionCode version_code.toInteger()
|
||||
versionName "$version_code"
|
||||
} else {
|
||||
versionCode parsedJson.version_code.toInteger()
|
||||
}
|
||||
if (project.hasProperty('content_version_code')) {
|
||||
def content_version_code = project.property('content_version_code')
|
||||
buildConfigField "int", "CONTENT_VERSION_CODE", "$content_version_code"
|
||||
} else if (parsedJson.content_version_code != null) {
|
||||
buildConfigField "int", "CONTENT_VERSION_CODE", "$parsedJson.content_version_code"
|
||||
} else if (project.hasProperty('version_code')) {
|
||||
def version_code = project.property('version_code')
|
||||
buildConfigField "int", "CONTENT_VERSION_CODE", "$version_code"
|
||||
} else if (parsedJson.version_code != null) {
|
||||
buildConfigField "int", "CONTENT_VERSION_CODE", "$parsedJson.version_code"
|
||||
}
|
||||
buildConfigField "String", "ENFORCED_LANG", "\"$parsedJson.enforced_lang\""
|
||||
|
@ -1,9 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.kiwix.kiwixmobile"
|
||||
android:installLocation="auto"
|
||||
android:versionCode="54"
|
||||
android:versionName="2.3">
|
||||
android:installLocation="auto">
|
||||
|
||||
<supports-screens
|
||||
android:anyDensity="true"
|
||||
|
Loading…
x
Reference in New Issue
Block a user