Add C++ Unit Tests for Android (#2563)
This commit is contained in:
@@ -3,18 +3,21 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
namespace "android.app"
|
||||
|
||||
compileSdkVersion 33
|
||||
buildFeatures {
|
||||
prefab true
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId = 'com.mapbox.mapboxsdk.maps.test_runner'
|
||||
applicationId = 'org.maplibre.cpp_test_runner'
|
||||
minSdkVersion 28
|
||||
targetSdkVersion 33
|
||||
compileSdk 34
|
||||
def abi = 'all'
|
||||
if (project.hasProperty('mapbox.abis')) {
|
||||
abi = project.getProperty('mapbox.abis')
|
||||
if (project.hasProperty('maplibre.abis')) {
|
||||
abi = project.getProperty('maplibre.abis')
|
||||
}
|
||||
ndk {
|
||||
if (abi != 'all') {
|
||||
if (abi != 'all' && abi != 'none') {
|
||||
abiFilters abi.split(' ')
|
||||
} else {
|
||||
abiFilters 'armeabi-v7a', 'x86', 'arm64-v8a', 'x86_64'
|
||||
@@ -22,6 +25,7 @@ android {
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments "-DMLN_LEGACY_RENDERER=OFF", "-DMLN_DRAWABLE_RENDERER=ON"
|
||||
arguments '-DANDROID_CCACHE=ccache'
|
||||
arguments '-DANDROID_STL=c++_static'
|
||||
targets 'mbgl-test-runner'
|
||||
@@ -34,7 +38,7 @@ android {
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
version '3.10.2'
|
||||
version "3.18.1+"
|
||||
path '../../../CMakeLists.txt'
|
||||
}
|
||||
}
|
||||
@@ -51,4 +55,5 @@ dependencies {
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
|
||||
androidTestImplementation 'androidx.test:rules:1.5.0'
|
||||
implementation 'io.github.vvb2060.ndk:curl:8.8.0'
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mapbox.mapboxsdk.maps.test_runner"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
@@ -15,6 +14,7 @@
|
||||
android:hasCode="true">
|
||||
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
Reference in New Issue
Block a user