summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2019-09-19 12:54:10 +0200
committertobrun <tobrun.van.nuland@gmail.com>2019-09-19 12:54:10 +0200
commit6b5946ea547c74b89b130c0c679595c3719e6b7a (patch)
tree4b3ca8d57a89c3f95536b98d5860731db76781c1
parent284dc0b563756a23cd7e85e0373ff08a381e724c (diff)
downloadqtlocation-mapboxgl-6b5946ea547c74b89b130c0c679595c3719e6b7a.tar.gz
[android] - add support for CMAKE_BUILD_TYPES RelWithDebInfo and MinSizeRel
-rw-r--r--platform/android/MapboxGLAndroidSDK/build.gradle6
-rw-r--r--platform/android/gradle/native-build.gradle9
2 files changed, 14 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle
index 5ee3af61e2..a14612bdc4 100644
--- a/platform/android/MapboxGLAndroidSDK/build.gradle
+++ b/platform/android/MapboxGLAndroidSDK/build.gradle
@@ -75,6 +75,12 @@ android {
testCoverageEnabled true
jniDebuggable true
}
+ RelWithDebInfo {
+ initWith release
+ }
+ MinSizeRel {
+ initWith release
+ }
}
}
diff --git a/platform/android/gradle/native-build.gradle b/platform/android/gradle/native-build.gradle
index 0c16c379dd..45c31bdcb8 100644
--- a/platform/android/gradle/native-build.gradle
+++ b/platform/android/gradle/native-build.gradle
@@ -1,6 +1,12 @@
ext.nativeBuild = { nativeTargets ->
android {
- defaultPublishConfig project.hasProperty("mapbox.buildtype") ? project.getProperty("mapbox.buildtype") : "debug"
+ def buildType = "debug"
+ if (project.hasProperty("mapbox.buildtype")) {
+ buildType = project.getProperty("mapbox.buildtype")
+ }
+
+
+ defaultPublishConfig buildType
// We sometimes want to invoke Gradle without building a native dependency, e.g. when we just want
// to invoke the Java tests. When we explicitly specify an ABI of 'none', no native dependencies are
@@ -37,6 +43,7 @@ ext.nativeBuild = { nativeTargets ->
if (abi != 'none') {
externalNativeBuild {
cmake {
+ arguments "-DCMAKE_BUILD_TYPE=" + buildType
arguments "-DANDROID_TOOLCHAIN=clang"
arguments "-DANDROID_STL=" + stl
arguments "-DANDROID_CPP_FEATURES=exceptions"