Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9711606cb9
4 changed files with 8 additions and 10 deletions
|
@ -2,8 +2,6 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:installLocation="auto"
|
android:installLocation="auto"
|
||||||
android:versionName="2.7.0"
|
|
||||||
android:versionCode="270"
|
|
||||||
package="net.osmand.plus">
|
package="net.osmand.plus">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
|
|
|
@ -39,10 +39,12 @@ android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion System.getenv("MIN_SDK_VERSION") ? System.getenv("MIN_SDK_VERSION").toInteger() : 14
|
minSdkVersion System.getenv("MIN_SDK_VERSION") ? System.getenv("MIN_SDK_VERSION").toInteger() : 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 23
|
||||||
|
versionCode 270
|
||||||
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 "2.7.0"
|
||||||
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
|
versionName System.getenv("APK_VERSION_SUFFIX")? versionName + System.getenv("APK_VERSION_SUFFIX").toString(): versionName
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
|
@ -187,9 +189,9 @@ def replaceNoTranslate(line) {
|
||||||
// if (line.contains("\"app_version\"") && System.getenv("APK_VERSION")) {
|
// if (line.contains("\"app_version\"") && System.getenv("APK_VERSION")) {
|
||||||
// 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")) {
|
||||||
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")) {
|
||||||
return line.replaceAll(">[^<]*<", ">" + System.getenv("APP_FEATURES") + "<")
|
return line.replaceAll(">[^<]*<", ">" + System.getenv("APP_FEATURES") + "<")
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<resources>
|
<resources>
|
||||||
<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 -->
|
||||||
|
|
||||||
<!-- Not translatable -->
|
<!-- Not translatable -->
|
||||||
<string name="full_version_price">€5,99</string>
|
<string name="full_version_price">€5,99</string>
|
||||||
|
|
|
@ -49,13 +49,11 @@ public class Version {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Version(OsmandApplication ctx) {
|
private Version(OsmandApplication ctx) {
|
||||||
// appVersion = ctx.getString(R.string.app_version);
|
|
||||||
String appVersion = "";
|
String appVersion = "";
|
||||||
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; //Version suffix ctx.getString(R.string.app_version_suffix) already appended in build.gradle
|
||||||
appVersion = packageInfo.versionName + ctx.getString(R.string.app_version_suffix);
|
|
||||||
versionCode = packageInfo.versionCode;
|
versionCode = packageInfo.versionCode;
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
Loading…
Reference in a new issue