Update gradle
This commit is contained in:
parent
e2358028cd
commit
b7e3eb2056
2 changed files with 40 additions and 51 deletions
11
OsmAnd/AndroidManifest-free.xml
Normal file
11
OsmAnd/AndroidManifest-free.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<application tools:replace="android:icon"
|
||||
android:icon="@drawable/icon_free">
|
||||
<service tools:replace="android:process"
|
||||
android:process="net.osmand"
|
||||
android:name="net.osmand.plus.NavigationService"/>
|
||||
|
||||
</application>
|
||||
</manifest>
|
|
@ -1,45 +1,28 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
// 1. fix_apostrophe_issues
|
||||
//<target name="fix_apostrophe_issues">
|
||||
//<replace token="version='1.0'" value="version="1.0"" encoding="UTF-8">
|
||||
//<fileset dir="res" includes="**/strings.xml" />
|
||||
//</replace>
|
||||
// <replace token="encoding='utf-8'" value="encoding="utf-8"" encoding="UTF-8">
|
||||
// <fileset dir="res" includes="**/strings.xml" />
|
||||
//</replace>
|
||||
//
|
||||
// <replaceregexp match="([^\\])'" replace="\1\\\\'" flags="-g" byline="off" encoding="UTF-8">
|
||||
// <fileset dir="res" includes="**/strings.xml" />
|
||||
//</replaceregexp>
|
||||
// </target>
|
||||
// +1. AndroidManifest.xml (+versionCode/APK_NUMBER_VERSION, +package, +android:process, +icon)
|
||||
|
||||
|
||||
// 2. AndroidManifest.xml (versionCode, package, android:process)
|
||||
// <replaceregexp file="AndroidManifest.xml" match='android:versionCode="(.*)"' replace='android:versionCode="${build.version.code}"' byline="true" />
|
||||
|
||||
// 3. sherpafy
|
||||
// <property name="package.name" value="net.osmand.sherpafy" />
|
||||
// <property name="app.name" value="Sherpafy" />
|
||||
// icon
|
||||
|
||||
// 4. Filter fonts
|
||||
// <unzip src="OsmAndCore_android.aar" dest=".">
|
||||
// <patternset>
|
||||
// <include name="assets/**/map/fonts/OpenSans/*"/>
|
||||
// <include name="assets/**/map/fonts/NotoSans/*"/>
|
||||
// </patternset>
|
||||
// </unzip>
|
||||
|
||||
// 5. no_translate.xml (versionFeatures, app.edition, build.version )
|
||||
// 2. no_translate.xml (versionFeatures, app.edition, build.version )
|
||||
// <condition>
|
||||
// <isset property="versionFeatures" />
|
||||
// </condition>
|
||||
// <then>
|
||||
// <replaceregexp file="res/values/no_translate.xml" match='versionFeatures">(.*)<
|
||||
// replace='versionFeatures">${versionFeatures}<' byline="true" />
|
||||
// 3. Filter fonts
|
||||
// <unzip src="OsmAndCore_android.aar" dest=".">
|
||||
// <patternset>
|
||||
// <include name="assets/**/map/fonts/OpenSans/*"/>
|
||||
// <include name="assets/**/map/fonts/NotoSans/*"/>
|
||||
// </patternset>
|
||||
// </unzip>
|
||||
// 4. fix_apostrophe_issues (replace match="[^=]([^\\])'" replace="\1\\\\'") res/**/strings.xml
|
||||
|
||||
|
||||
// 5. sherpafy/free/paid
|
||||
// <property name="package.name" value="net.osmand.sherpafy" />
|
||||
// <property name="app.name" value="Sherpafy" />
|
||||
|
||||
android {
|
||||
compileSdkVersion 21
|
||||
buildToolsVersion "21.1.2"
|
||||
|
@ -64,8 +47,8 @@ android {
|
|||
minSdkVersion 9
|
||||
targetSdkVersion 21
|
||||
|
||||
versionCode System.getenv("APK_NUMBER_VERSION") ?: versionCode
|
||||
versionName System.getenv("APK_VERSION") ?: versionName
|
||||
versionCode System.getenv("APK_NUMBER_VERSION").toInteger( ) ?: System.getenv("APK_NUMBER_VERSION").toInteger()
|
||||
versionName System.getenv("APK_VERSION") ?: System.getenv("APK_VERSION")
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
|
@ -110,9 +93,12 @@ android {
|
|||
"helpAssets"
|
||||
]
|
||||
}
|
||||
free {
|
||||
manifest.srcFile "AndroidManifest-free.xml"
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "version", "distribution", "abi"
|
||||
flavorDimensions "version", "abi"
|
||||
productFlavors {
|
||||
// ABI
|
||||
armv7 {
|
||||
|
@ -148,7 +134,7 @@ android {
|
|||
flavorDimension "version"
|
||||
applicationId "net.osmand"
|
||||
}
|
||||
paid {
|
||||
full {
|
||||
flavorDimension "version"
|
||||
applicationId "net.osmand.plus"
|
||||
}
|
||||
|
@ -159,19 +145,6 @@ android {
|
|||
}
|
||||
*/
|
||||
|
||||
// Distribution
|
||||
night {
|
||||
flavorDimension "distribution"
|
||||
}
|
||||
/*
|
||||
googleplay {
|
||||
flavorDimension "distribution"
|
||||
}
|
||||
|
||||
amazon {
|
||||
flavorDimension "distribution"
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
@ -181,9 +154,14 @@ android {
|
|||
nativeDebug {
|
||||
signingConfig signingConfigs.development
|
||||
}
|
||||
legacyDebug {
|
||||
signingConfig signingConfigs.development
|
||||
}
|
||||
release {
|
||||
signingConfig signingConfigs.publishing
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -282,10 +260,10 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: "libs", include: ["*.jar"], exclude: ["QtAndroid-bundled.jar", "QtAndroidAccessibility-bundled.jar"])
|
||||
compile fileTree(dir: "libs", include: ["*.jar"], exclude: ["QtAndroid-bundled.jar", "QtAndroidAccessibility-bundled.jar", "android-support*.jar", "OsmAndCore_wrapper.jar"])
|
||||
compile 'com.android.support:appcompat-v7:21.0.3'
|
||||
compile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
|
||||
debugCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar"
|
||||
debugCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
|
||||
legacyDebugCompile fileTree(dir: "libs", include: ["OsmAndCore_wrapper.jar"])
|
||||
nativeDebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar"
|
||||
releaseCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue