update gradle

This commit is contained in:
Victor Shcherb 2015-01-21 00:51:32 +01:00
parent 9725ec2f87
commit f4124c040b

View file

@ -1,5 +1,6 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
// 1. fix_apostrophe_issues
//<target name="fix_apostrophe_issues"> //<target name="fix_apostrophe_issues">
//<replace token="version='1.0'" value="version=&quot;1.0&quot;" encoding="UTF-8"> //<replace token="version='1.0'" value="version=&quot;1.0&quot;" encoding="UTF-8">
//<fileset dir="res" includes="**/strings.xml" /> //<fileset dir="res" includes="**/strings.xml" />
@ -13,6 +14,32 @@ apply plugin: 'com.android.application'
//</replaceregexp> //</replaceregexp>
// </target> // </target>
// 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 )
// <condition>
// <isset property="versionFeatures" />
// </condition>
// <then>
// <replaceregexp file="res/values/no_translate.xml" match='versionFeatures"&gt;(.*)&lt;
// replace='versionFeatures"&gt;${versionFeatures}&lt;' byline="true" />
android { android {
compileSdkVersion 21 compileSdkVersion 21
buildToolsVersion "21.1.2" buildToolsVersion "21.1.2"
@ -75,11 +102,10 @@ android {
] ]
renderscript.srcDirs = ["src"] renderscript.srcDirs = ["src"]
res.srcDirs = [ res.srcDirs = [
"res", "res"
"../../resources/rendering_styles/style-icons/"
] ]
assets.srcDirs = [ assets.srcDirs = [
"assets", fileTree(dir:"assets", exclude: ["voice/*", "specialphrases/*"]),
"voiceAssets", "voiceAssets",
"helpAssets" "helpAssets"
] ]
@ -89,18 +115,6 @@ android {
flavorDimensions "version", "distribution", "abi" flavorDimensions "version", "distribution", "abi"
productFlavors { productFlavors {
// ABI // ABI
x86 {
flavorDimension "abi"
ndk {
abiFilter "x86"
}
}
mips {
flavorDimension "abi"
ndk {
abiFilter "mips"
}
}
armv7 { armv7 {
flavorDimension "abi" flavorDimension "abi"
ndk { ndk {
@ -113,6 +127,18 @@ android {
abiFilter "armeabi" abiFilter "armeabi"
} }
} }
x86 {
flavorDimension "abi"
ndk {
abiFilter "x86"
}
}
mips {
flavorDimension "abi"
ndk {
abiFilter "mips"
}
}
fat { fat {
flavorDimension "abi" flavorDimension "abi"
} }
@ -134,10 +160,14 @@ android {
*/ */
// Distribution // Distribution
googleplay { night {
flavorDimension "distribution" flavorDimension "distribution"
} }
/* /*
googleplay {
flavorDimension "distribution"
}
amazon { amazon {
flavorDimension "distribution" flavorDimension "distribution"
} }
@ -176,6 +206,12 @@ task collectRenderingStyles(type: Sync) {
include "*.xml" include "*.xml"
} }
task copyStyleIcons(type: Copy) {
from "../../resources/rendering_styles/style-icons/"
into "res/"
include "**/*.png"
}
task collectRegionsInfo(type: Copy) { task collectRegionsInfo(type: Copy) {
from "../../resources/countries-info" from "../../resources/countries-info"
into "resourcesSrc/net/osmand/map" into "resourcesSrc/net/osmand/map"
@ -202,6 +238,7 @@ task collectMiscResources(type: Copy) {
task collectExternalResources << {} task collectExternalResources << {}
collectExternalResources.dependsOn collectVoiceAssets, collectExternalResources.dependsOn collectVoiceAssets,
copyStyleIcons,
collectRoutingResources, collectRoutingResources,
collectRenderingStyles, collectRenderingStyles,
collectRegionsInfo, collectRegionsInfo,
@ -246,7 +283,7 @@ repositories {
dependencies { 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"])
compile "com.actionbarsherlock:actionbarsherlock:4.4.0@aar" compile 'com.android.support:appcompat-v7:21.0.3'
compile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar" compile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
debugCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar" debugCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar"
nativeDebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar" nativeDebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar"