Update gradle

This commit is contained in:
Victor Shcherb 2015-01-21 13:43:07 +01:00
parent 7f9e54ba08
commit 735ba68cc7

View file

@ -1,28 +1,23 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
// TODO
// 0. Update! OsmAndCore_wrapper for build () // 0. Update! OsmAndCore_wrapper for build ()
// +1. AndroidManifest.xml (+versionCode/APK_NUMBER_VERSION, +package, +android:process, +icon) // 1. no_translate.xml (versionFeatures, app.edition, build.version )
// 2. no_translate.xml (versionFeatures, app.edition, build.version )
// <condition> // <condition>
// <isset property="versionFeatures" /> // <isset property="versionFeatures" />
// </condition> // </condition>
// <then> // <then>
// <replaceregexp file="res/values/no_translate.xml" match='versionFeatures"&gt;(.*)&lt; // <replaceregexp file="res/values/no_translate.xml" match='versionFeatures"&gt;(.*)&lt;
// replace='versionFeatures"&gt;${versionFeatures}&lt;' byline="true" /> // replace='versionFeatures"&gt;${versionFeatures}&lt;' byline="true" />
// 3. Filter fonts // 2. Filter fonts
// <unzip src="OsmAndCore_android.aar" dest="."> // <unzip src="OsmAndCore_android.aar" dest=".">
// <patternset> // <patternset>
// <include name="assets/**/map/fonts/OpenSans/*"/> // <include name="assets/**/map/fonts/OpenSans/*"/>
// <include name="assets/**/map/fonts/NotoSans/*"/> // <include name="assets/**/map/fonts/NotoSans/*"/>
// </patternset> // </patternset>
// </unzip> // </unzip>
// 4. fix_apostrophe_issues (replace match="[^=]([^\\])'" replace="\1\\\\'") res/**/strings.xml // 3. fix_apostrophe_issues (replace match="[^=]([^\\])'" replace="\1\\\\'") res/**/strings.xml
// 4. sherpafy/free/paid
// 5. sherpafy/free/paid
// <property name="package.name" value="net.osmand.sherpafy" />
// <property name="app.name" value="Sherpafy" />
android { android {
compileSdkVersion 21 compileSdkVersion 21
@ -165,19 +160,24 @@ android {
} }
task collectVoiceAssets(type: Sync) { task collectVoiceAssets(type: Sync) {
from "../../resources" from "../../resources/voice"
into "assets" into "assets/voice"
include "specialphrases/**"
include "voice/**/*.p" include "voice/**/*.p"
} }
task collectSpecialPhrasesAssets(type: Sync) {
from "../../resources/voice"
into "assets/specialphrases"
include "specialphrases/*.txt"
}
task collectRoutingResources(type: Sync) { task collectRoutingResources(type: Sync) {
from "../../resources/routing" from "../../resources/routing"
into "resourcesSrc/net/osmand/router" into "resourcesSrc/net/osmand/router"
include "*.xml" include "*.xml"
} }
task collectRenderingStyles(type: Sync) { task collectRenderingStylesResources(type: Sync) {
from "../../resources/rendering_styles" from "../../resources/rendering_styles"
into "resourcesSrc/net/osmand/render" into "resourcesSrc/net/osmand/render"
include "*.xml" include "*.xml"
@ -189,13 +189,13 @@ task copyStyleIcons(type: Copy) {
include "**/*.png" include "**/*.png"
} }
task collectRegionsInfo(type: Copy) { task collectRegionsInfoResources(type: Copy) {
from "../../resources/countries-info" from "../../resources/countries-info"
into "resourcesSrc/net/osmand/map" into "resourcesSrc/net/osmand/map"
include "regions.ocbf" include "regions.ocbf"
} }
task collectHelpContents(type: Sync) { task collectHelpContentsAssets(type: Sync) {
from "../../help" from "../../help"
into "assets/help" into "assets/help"
include "*.html" include "*.html"
@ -219,12 +219,13 @@ task collectMiscResources(type: Copy) {
task collectExternalResources << {} task collectExternalResources << {}
collectExternalResources.dependsOn collectVoiceAssets, collectExternalResources.dependsOn collectVoiceAssets,
copyStyleIcons, collectSpecialPhrasesAssets,
collectHelpContentsAssets,
collectRoutingResources, collectRoutingResources,
collectRenderingStyles, collectRenderingStylesResources,
collectRegionsInfo, collectRegionsInfoResources,
collectHelpContents, collectMiscResources,
collectMiscResources copyStyleIcons
tasks.withType(JavaCompile) { tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn << collectExternalResources compileTask -> compileTask.dependsOn << collectExternalResources