apply plugin: 'com.android.application' android { compileSdkVersion 27 buildToolsVersion "27.0.3" dexOptions { jumboMode true } defaultConfig { minSdkVersion 15 targetSdkVersion 27 versionCode 1 versionName "1.0" multiDexEnabled true } lintOptions { abortOnError false } // This is from OsmAndCore_android.aar - for some reason it's not inherited aaptOptions { // Don't compress any embedded resources noCompress "qz", "png" } sourceSets { main { manifest.srcFile "AndroidManifest.xml" jni.srcDirs = [] jniLibs.srcDirs = ["libs"] java.srcDirs = ["src"] renderscript.srcDirs = ["src"] resources.srcDirs = ["src"] res.srcDirs = ["res"] assets.srcDirs = ["assets"] } } flavorDimensions "abi" productFlavors { x86 { dimension "abi" ndk { abiFilter "x86" } } arm64 { dimension "abi" ndk { abiFilter 'arm64-v8a' } } armv7 { dimension "abi" ndk { abiFilter "armeabi-v7a" } } fat { dimension "abi" ndk { abiFilters 'arm64-v8a', 'x86', 'armeabi-v7a' } } } buildTypes { debug { signingConfig android.signingConfigs.debug } nativeDebug { signingConfig android.signingConfigs.debug } release { signingConfig android.signingConfigs.debug } } } task collectMiscResources(type: Copy) { into "src/net/osmand/osm" from("../../resources/poi") { include "poi_types.xml" } } task collectRegionsInfoResources(type: Copy) { from "../../resources/countries-info" into "src/net/osmand/map" include "regions.ocbf" } task collectRoutingResources(type: Sync) { from "../../resources/routing" into "src/net/osmand/router" include "routing.xml" } tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn << [collectMiscResources, collectRegionsInfoResources, collectRoutingResources] } repositories { // Local build //flatDir { // dirs 'libs' //} ivy { name = "OsmAndBinariesIvy" url = "http://builder.osmand.net" layout "pattern" , { artifact "ivy/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" } } jcenter() } dependencies { implementation project(path: ':OsmAnd-java', configuration: 'android') implementation 'com.android.support:multidex:1.0.3' implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support:design:27.1.1' implementation 'commons-logging:commons-logging-api:1.1' implementation 'com.moparisthebest:junidecode:0.1.1' implementation fileTree(include: ['gnu-trove-osmand.jar', 'icu4j-49_1_patched.jar'], dir: 'libs') implementation "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar" debugImplementation "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar" nativeDebugImplementation "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar" releaseImplementation "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar" // Local build //implementation 'com.vividsolutions:jts-core:1.14.0' //implementation(name: 'OsmAndCore_android-release', ext: 'aar') //implementation(name: 'OsmAndCore_androidNativeRelease-release', ext: 'aar') //implementation files('libs/QtAndroid-bundled.jar') //implementation files('libs/QtAndroidAccessibility-bundled.jar') }