diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/build.gradle')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/build.gradle | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle index e796c35cee..f91df8a8a4 100644 --- a/platform/android/MapboxGLAndroidSDK/build.gradle +++ b/platform/android/MapboxGLAndroidSDK/build.gradle @@ -1,22 +1,25 @@ apply plugin: 'com.android.library' apply plugin: "com.jaredsburrows.license" +apply plugin: 'kotlin-android' dependencies { lintChecks project(":MapboxGLAndroidSDKLint") - api (dependenciesList.mapboxAndroidTelemetry) { + api(dependenciesList.mapboxAndroidTelemetry) { exclude group: 'com.android.support', module: 'appcompat-v7' } api dependenciesList.mapboxJavaGeoJSON - api (dependenciesList.mapboxAndroidGestures) { + api(dependenciesList.mapboxAndroidGestures) { exclude group: 'com.android.support', module: 'appcompat-v7' } implementation dependenciesList.mapboxJavaTurf + implementation dependenciesList.supportAppcompatV7 implementation dependenciesList.supportAnnotations implementation dependenciesList.supportFragmentV4 implementation dependenciesList.okhttp3 testImplementation dependenciesList.junit testImplementation dependenciesList.mockito testImplementation dependenciesList.robolectric + testImplementation dependenciesList.kotlinLib } android { @@ -24,6 +27,7 @@ android { buildToolsVersion androidVersions.buildToolsVersion defaultConfig { + vectorDrawables.useSupportLibrary = true minSdkVersion androidVersions.minSdkVersion targetSdkVersion androidVersions.targetSdkVersion buildConfigField "String", "GIT_REVISION_SHORT", String.format("\"%s\"", getGitRevision()) @@ -59,12 +63,18 @@ android { } } + // Allow determining the C++ STL we're using when building Mapbox GL. + def stl = 'c++_static' + if (project.hasProperty("mapbox.stl")) { + stl = project.getProperty("mapbox.stl") + } + defaultConfig { if (abi != 'none') { externalNativeBuild { cmake { arguments "-DANDROID_TOOLCHAIN=clang" - arguments "-DANDROID_STL=c++_static" + arguments "-DANDROID_STL=" + stl arguments "-DANDROID_CPP_FEATURES=rtti;exceptions" arguments "-DMBGL_PLATFORM=android" arguments "-DMASON_PLATFORM=android" |