Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
35f14f4549
3 changed files with 4 additions and 9 deletions
|
@ -2,8 +2,8 @@ apply plugin: 'com.android.application'
|
||||||
// Global Parameters accepted
|
// Global Parameters accepted
|
||||||
// TARGET_APP_NAME - app name
|
// TARGET_APP_NAME - app name
|
||||||
// APK_NUMBER_VERSION - version number of apk
|
// APK_NUMBER_VERSION - version number of apk
|
||||||
// APK_VERSION_SUFFIX - build number like #99999Z (for dev builds only)
|
// APK_VERSION_SUFFIX - build number like #99999Z, appended (for dev builds) to Manifest's versionName as X.X.X#99999Z
|
||||||
// flavor Z : M=-master, D=-design, B=-Blackberry, MD=-main-default, MQA=-main-qt-arm, MQDA=-main-qt-default-arm, S=-sherpafy
|
// Z means flavor: M=-master, D=-main-default, B=-Blackberry, Des=-design, MQA=-main-qt-arm, MQDA=-main-qt-default-arm, S=-sherpafy
|
||||||
// APP_EDITION - date stamp of builds
|
// APP_EDITION - date stamp of builds
|
||||||
// APP_FEATURES - features +play_market +gps_status -parking_plugin -blackberry -free_version -amazon
|
// APP_FEATURES - features +play_market +gps_status -parking_plugin -blackberry -free_version -amazon
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ android {
|
||||||
versionCode System.getenv("APK_NUMBER_VERSION") ? System.getenv("APK_NUMBER_VERSION").toInteger() : versionCode
|
versionCode System.getenv("APK_NUMBER_VERSION") ? System.getenv("APK_NUMBER_VERSION").toInteger() : versionCode
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
versionName System.getenv("APK_VERSION")? System.getenv("APK_VERSION").toString(): versionName
|
versionName System.getenv("APK_VERSION")? System.getenv("APK_VERSION").toString(): versionName
|
||||||
|
//versionName System.getenv("APK_VERSION_SUFFIX")? versionName + System.getenv("APK_VERSION_SUFFIX").toString(): versionName
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
|
@ -187,7 +188,6 @@ def replaceNoTranslate(line) {
|
||||||
// return line.replaceAll(">[^<]*<", ">" + System.getenv("APK_VERSION") + "<")
|
// return line.replaceAll(">[^<]*<", ">" + System.getenv("APK_VERSION") + "<")
|
||||||
// }
|
// }
|
||||||
if (line.contains("\"app_version_suffix\"") && System.getenv("APK_VERSION_SUFFIX")) {
|
if (line.contains("\"app_version_suffix\"") && System.getenv("APK_VERSION_SUFFIX")) {
|
||||||
// appends build number to version number for dev builds
|
|
||||||
return line.replaceAll("</", System.getenv("APK_VERSION_SUFFIX") + "</")
|
return line.replaceAll("</", System.getenv("APK_VERSION_SUFFIX") + "</")
|
||||||
}
|
}
|
||||||
if (line.contains("\"versionFeatures\"") && System.getenv("APP_FEATURES")) {
|
if (line.contains("\"versionFeatures\"") && System.getenv("APP_FEATURES")) {
|
||||||
|
|
|
@ -3,12 +3,6 @@
|
||||||
<string name="app_name">OsmAnd~</string>
|
<string name="app_name">OsmAnd~</string>
|
||||||
<string name="app_name_free">OsmAndF~</string>
|
<string name="app_name_free">OsmAndF~</string>
|
||||||
<string name="app_version_suffix"></string>
|
<string name="app_version_suffix"></string>
|
||||||
<!--
|
|
||||||
Note: appVersion will be concatenated via Manifest's "android:versionName" ("X.X.X") and the build info "app_version_suffix" ("#YYYYYZ" for dev builds only) as follows:
|
|
||||||
X.X.X#YYYYYZ , where
|
|
||||||
YYYYY is the build number of build branch Z
|
|
||||||
Z : M=-master, D=-main-default, B=-Blackberry, Des=-design, MQA=-main-qt-arm, MQDA=-main-qt-default-arm, S=-sherpafy
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Not translatable -->
|
<!-- Not translatable -->
|
||||||
<string name="full_version_price">€5,99</string>
|
<string name="full_version_price">€5,99</string>
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class Version {
|
||||||
int versionCode = -1;
|
int versionCode = -1;
|
||||||
try {
|
try {
|
||||||
PackageInfo packageInfo = ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), 0);
|
PackageInfo packageInfo = ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), 0);
|
||||||
|
//appVersion = packageInfo.versionName; //already appended in build.gradle: + ctx.getString(R.string.app_version_suffix);
|
||||||
appVersion = packageInfo.versionName + ctx.getString(R.string.app_version_suffix);
|
appVersion = packageInfo.versionName + ctx.getString(R.string.app_version_suffix);
|
||||||
versionCode = packageInfo.versionCode;
|
versionCode = packageInfo.versionCode;
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
|
|
Loading…
Reference in a new issue