Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cf6988929d
3 changed files with 14 additions and 14 deletions
|
@ -1,9 +1,9 @@
|
|||
apply plugin: 'com.android.application'
|
||||
// Global Parameters accepted
|
||||
// APK_NUMBER_VERSION - version number of apk
|
||||
// APK_VERSION - build number like #9999Z, for dev builds appended to app_version like 2.0.0 in no_translate.xml)
|
||||
// flavor Z : M=-master, D=-design, B=-Blackberry, MD=-main-default, MQA=-main-qt-arm, MQDA=-main-qt-default-arm, S=-sherpafy
|
||||
// TARGET_APP_NAME - app name
|
||||
// APK_NUMBER_VERSION - version number of apk
|
||||
// APK_VERSION_SUFFIX - build number like #99999Z (for dev builds only)
|
||||
// flavor Z : M=-master, D=-design, B=-Blackberry, MD=-main-default, MQA=-main-qt-arm, MQDA=-main-qt-default-arm, S=-sherpafy
|
||||
// APP_EDITION - date stamp of builds
|
||||
// APP_FEATURES - features +play_market +gps_status -parking_plugin -blackberry -free_version -amazon
|
||||
|
||||
|
@ -186,10 +186,10 @@ def replaceNoTranslate(line) {
|
|||
// if (line.contains("\"app_version\"") && System.getenv("APK_VERSION")) {
|
||||
// return line.replaceAll(">[^<]*<", ">" + System.getenv("APK_VERSION") + "<")
|
||||
// }
|
||||
// if (line.contains("\"app_version\"") && 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")) {
|
||||
return line.replaceAll(">[^<]*<", ">" + System.getenv("APP_FEATURES") + "<")
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
<resources>
|
||||
<string name="app_name">OsmAnd~</string>
|
||||
<string name="app_name_free">OsmAndF~</string>
|
||||
<string name="app_version_suffix"></string>
|
||||
<!--
|
||||
Note: For our dev build apk's, the above "app_version" is provided (via osmand/build.xml) as the base version prefix to our build number in the format:
|
||||
X.X.X#YYYYZ , where
|
||||
X.X.X is the above base (released) "app_version",
|
||||
YYYY is the build number of build branch Z
|
||||
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
|
||||
-->
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public class Version {
|
|||
int versionCode = -1;
|
||||
try {
|
||||
PackageInfo packageInfo = ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), 0);
|
||||
appVersion = packageInfo.versionName;
|
||||
appVersion = packageInfo.versionName + ctx.getString(R.string.app_version_suffix);
|
||||
versionCode = packageInfo.versionCode;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Reference in a new issue