diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index e062923ca..2dd28d5e9 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -118,7 +118,22 @@ jobs: echo "No secrets.MAPLIBRE_DEVELOPER_CONFIG_XML variable set, not copying..." fi + - name: Build Benchmark + if: github.ref != 'refs/heads/main' + run: | + ./gradlew assembleDrawableRelease assembleDrawableReleaseAndroidTest + + - uses: actions/upload-artifact@v3 + if: github.ref != 'refs/heads/main' + with: + if-no-files-found: error + name: benchmarkAPKs + path: | + platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/drawable/release/MapboxGLAndroidSDKTestApp-drawable-release.apk + platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/androidTest/drawable/release/MapboxGLAndroidSDKTestApp-drawable-release-androidTest.apk + - name: Build UI tests + if: github.ref == 'refs/heads/main' run: make android-ui-test-arm-v8 - name: Configure AWS Credentials @@ -230,6 +245,7 @@ jobs: project_arn: ${{ vars.AWS_DEVICE_FARM_PROJECT_ARN }} device_pool_arn: ${{ vars.AWS_DEVICE_FARM_DEVICE_POOL_ARN }} app_arn: ${{ env.ANDROID_APP_ARN }} + test_spec_arn: ${{ vars.AWS_DEVICE_FARM_TEST_SPEC_ARN_ANDROID_UI_TESTS }} app_type: ANDROID_APP test_type: INSTRUMENTATION test_package_arn: ${{ env.ANDROID_TEST_ARN }} diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle index 10ffec123..4904f8ace 100644 --- a/platform/android/MapboxGLAndroidSDK/build.gradle +++ b/platform/android/MapboxGLAndroidSDK/build.gradle @@ -26,7 +26,6 @@ dependencies { testImplementation dependenciesList.mockito testImplementation dependenciesList.mockk testImplementation dependenciesList.robolectric - testImplementation dependenciesList.kotlinLib testImplementation dependenciesList.commonsIO testImplementation dependenciesList.assertjcore @@ -53,6 +52,7 @@ android { minSdkVersion androidVersions.minSdkVersion targetSdkVersion androidVersions.targetSdkVersion buildConfigField "String", "GIT_REVISION_SHORT", String.format("\"%s\"", getGitRevision()) + buildConfigField "String", "GIT_REVISION", String.format("\"%s\"", getGitRevision(false)) buildConfigField "String", "MAPBOX_SDK_IDENTIFIER", String.format("\"%s\"", "mapbox-maps-android") buildConfigField "String", "MAPBOX_SDK_VERSION", String.format("\"%s\"", project.VERSION_NAME) buildConfigField "String", "MAPBOX_VERSION_STRING", String.format("\"Mapbox/%s\"", project.VERSION_NAME) @@ -128,6 +128,15 @@ android { disable 'MissingTranslation', 'TypographyQuotes', 'ObsoleteLintCustomCheck', 'MissingPermission', 'WrongThreadInterprocedural' warningsAsErrors false } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = "1.8" + } } licenseReport { @@ -137,8 +146,8 @@ licenseReport { copyJsonReportToAssets = false } -def static getGitRevision() { - def cmd = "git rev-parse --short HEAD" +def static getGitRevision(shortRev = true) { + def cmd = shortRev ? "git rev-parse --short HEAD" : "git rev-parse HEAD" def proc = cmd.execute() def ref = proc.text.trim() return ref diff --git a/platform/android/MapboxGLAndroidSDKLint/build.gradle b/platform/android/MapboxGLAndroidSDKLint/build.gradle index 1e0952d91..5b74b737d 100644 --- a/platform/android/MapboxGLAndroidSDKLint/build.gradle +++ b/platform/android/MapboxGLAndroidSDKLint/build.gradle @@ -7,7 +7,6 @@ apply plugin: 'kotlin' dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - compileOnly dependenciesList.kotlinLib compileOnly dependenciesList.lint compileOnly dependenciesList.lintApi diff --git a/platform/android/MapboxGLAndroidSDKTestApp/build.gradle b/platform/android/MapboxGLAndroidSDKTestApp/build.gradle index 7b2fc628e..139154ce6 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/build.gradle +++ b/platform/android/MapboxGLAndroidSDKTestApp/build.gradle @@ -1,6 +1,8 @@ plugins { id 'org.jmailen.kotlinter' id 'com.android.application' + id 'org.jetbrains.kotlin.android' + id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.21' } apply from: "${rootDir}/gradle/native-build.gradle" @@ -23,6 +25,10 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } + kotlinOptions { + jvmTarget = "1.8" + } + nativeBuild(["example-custom-layer"]) packagingOptions { resources { @@ -44,10 +50,13 @@ android { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + testProguardFiles 'test-proguard-rules.pro' signingConfig signingConfigs.debug } } + testBuildType "release" // for benchmark + flavorDimensions += "renderer" productFlavors { create("legacy") { @@ -74,8 +83,6 @@ android { } dependencies { - implementation dependenciesList.kotlinLib - implementation project(':MapboxGLAndroidSDK') implementation dependenciesList.mapboxJavaTurf @@ -83,6 +90,7 @@ dependencies { implementation dependenciesList.supportRecyclerView implementation dependenciesList.supportDesign implementation dependenciesList.supportConstraintLayout + implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0' implementation dependenciesList.multidex @@ -100,14 +108,12 @@ dependencies { androidTestImplementation dependenciesList.testEspressoContrib androidTestImplementation dependenciesList.testUiAutomator androidTestImplementation dependenciesList.appCenter - androidTestImplementation 'androidx.test.ext:junit:1.1.4' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test:core-ktx:1.5.0' + } apply from: "${rootDir}/gradle/gradle-make.gradle" apply from: "${rootDir}/gradle/gradle-config.gradle" apply from: "${rootDir}/gradle/gradle-checkstyle.gradle" -apply from: "${rootDir}/gradle/gradle-lint.gradle" - - - -apply plugin: 'kotlin-android' +apply from: "${rootDir}/gradle/gradle-lint.gradle" \ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/org/maplibre/android/benchmark/Benchmark.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/org/maplibre/android/benchmark/Benchmark.kt new file mode 100644 index 000000000..b6a057bda --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/org/maplibre/android/benchmark/Benchmark.kt @@ -0,0 +1,22 @@ +package org.maplibre.android.benchmark + +import android.app.Activity +import androidx.lifecycle.Lifecycle +import androidx.test.core.app.ActivityScenario +import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner +import org.junit.Assert.assertEquals +import org.junit.Test +import org.junit.runner.RunWith +import org.maplibre.android.testapp.activity.benchmark.BenchmarkActivity + +@RunWith(AndroidJUnit4ClassRunner::class) +class Benchmark { + @Test + fun worldTourBenchmark() { + val scenario = ActivityScenario.launchActivityForResult(BenchmarkActivity::class.java) + while (scenario.state !== Lifecycle.State.DESTROYED) { + Thread.sleep(1000) + } + assertEquals(scenario.result.resultCode, Activity.RESULT_OK) + } +} \ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml index 494b37eee..ee0bffdca 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml @@ -1,5 +1,6 @@ - + @@ -1184,10 +1185,11 @@ + tools:ignore="LockedOrientationActivity"> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/org/maplibre/android/testapp/activity/benchmark/BenchmarkActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/org/maplibre/android/testapp/activity/benchmark/BenchmarkActivity.kt index 3d8003631..da8f53aa8 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/org/maplibre/android/testapp/activity/benchmark/BenchmarkActivity.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/org/maplibre/android/testapp/activity/benchmark/BenchmarkActivity.kt @@ -1,47 +1,70 @@ package org.maplibre.android.testapp.activity.benchmark import android.annotation.SuppressLint +import android.os.Build import android.os.Bundle +import android.os.Environment import android.os.Handler import android.view.View +import android.view.WindowManager import androidx.appcompat.app.AppCompatActivity +import kotlinx.serialization.encodeToString +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonObject +import kotlinx.serialization.json.JsonPrimitive +import kotlinx.serialization.json.buildJsonObject +import kotlinx.serialization.json.jsonArray +import kotlinx.serialization.json.jsonObject +import kotlinx.serialization.json.jsonPrimitive +import kotlinx.serialization.json.putJsonObject +import okhttp3.MediaType.Companion.toMediaType +import okhttp3.OkHttpClient +import okhttp3.Request +import okhttp3.RequestBody.Companion.toRequestBody +import org.maplibre.android.BuildConfig.GIT_REVISION import org.maplibre.android.camera.CameraUpdateFactory import org.maplibre.android.geometry.LatLng +import org.maplibre.android.log.Logger import org.maplibre.android.maps.* import org.maplibre.android.maps.MapLibreMap.CancelableCallback +import org.maplibre.android.testapp.BuildConfig import org.maplibre.android.testapp.R +import org.maplibre.android.testapp.utils.FpsStore +import org.maplibre.android.testapp.utils.BenchmarkResults +import java.io.File + import java.util.* -class FpsStore { - private val fpsValues = ArrayList(100000) - - fun add(fps: Double) { - fpsValues.add(fps) - } - - fun reset() { - fpsValues.clear() - } - - fun low1p(): Double { - fpsValues.sort() - return fpsValues.slice(0..(fpsValues.size / 100)).average() - } - - fun average(): Double { - return fpsValues.average() +data class BenchmarkInputData( + val styleNames: List, + val styleURLs: List, + val resultsAPI: String = "" +) { + init { + if (styleNames.size != styleURLs.size) + throw Error("Different size: styleNames=$styleNames, styleURLs=$styleURLs") } } -data class Result(val average: Double, val low1p: Double) - -data class Results( - var map: MutableMap> = mutableMapOf>().withDefault { emptyList() }) - { - - fun addResult(styleName: String, fpsStore: FpsStore) { - val newResults = map.getValue(styleName).plus(Result(fpsStore.average(), fpsStore.low1p())) - map[styleName] = newResults +/** + * Prepares JSON payload that is sent to the API that collects benchmark results. + * See https://github.com/maplibre/ci-runners + */ +fun jsonPayload(results: BenchmarkResults): JsonObject { + return buildJsonObject { + putJsonObject("resultsPerStyle") { + for ((styleName, result) in results.resultsPerStyle) { + putJsonObject(styleName) { + put("avgFps", JsonPrimitive(result.map { it.average }.average())) + put("low1p", JsonPrimitive(result.map { it.low1p }.average())) + } + } + } + put("deviceManufacturer", JsonPrimitive(Build.MANUFACTURER)) + put("model", JsonPrimitive(Build.MODEL)) + put("renderer", JsonPrimitive(BuildConfig.FLAVOR)) + put("debugBuild", JsonPrimitive(BuildConfig.DEBUG)) + put("gitRevision", JsonPrimitive(GIT_REVISION)) } } @@ -49,12 +72,14 @@ data class Results( * Benchmark using a [android.view.TextureView] */ class BenchmarkActivity : AppCompatActivity() { + private val TAG = "BenchmarkActivity" + private lateinit var mapView: MapView private lateinit var maplibreMap: MapLibreMap private var handler: Handler? = null private var delayed: Runnable? = null private var fpsStore = FpsStore() - private var results = Results() + private var results = BenchmarkResults() private var runsLeft = 5 // the styles used for the benchmark @@ -67,27 +92,79 @@ class BenchmarkActivity : AppCompatActivity() { // https://zelonewolf.github.io/openstreetmap-americana/style.json // // ``` - private var styles = listOf(Pair("Demotiles", "https://demotiles.maplibre.org/style.json")) + private lateinit var inputData: BenchmarkInputData @SuppressLint("DiscouragedApi") + private fun getStringFromResources(name: String): String { + return try { + resources.getString(applicationContext.resources.getIdentifier( + name, + "string", + applicationContext.packageName)) + } catch (e: Throwable) { + "" + } + } + + @SuppressLint("DiscouragedApi") + private fun getArrayFromResources(name: String): Array { + return try { + resources.getStringArray(applicationContext.resources.getIdentifier( + name, + "array", + applicationContext.packageName)) + } catch (e: Throwable) { + emptyArray() + } + } + + private fun getBenchmarkInputData(): BenchmarkInputData { + // read input for benchmark from JSON file (on CI) + val jsonFile = File("${Environment.getExternalStorageDirectory()}/benchmark-input.json") + if (jsonFile.isFile) { + val jsonFileContents = jsonFile.readText() + val jsonElement = Json.parseToJsonElement(jsonFileContents) + val styleNames = jsonElement.jsonObject["styleNames"]?.jsonArray?.map { it.jsonPrimitive.content } + val styleURLs = jsonElement.jsonObject["styleURLs"]?.jsonArray?.map { it.jsonPrimitive.content } + val resultsAPI = jsonElement.jsonObject["resultsAPI"]?.jsonPrimitive?.content + if (styleNames == null || styleURLs == null || resultsAPI == null) { + throw Error("${jsonFile.name} is missing elements") + } + return BenchmarkInputData( + styleNames = styleNames.toList(), + styleURLs = styleURLs.toList(), + resultsAPI = resultsAPI + ) + } else { + Logger.i(TAG, "${jsonFile.name} not found, reading from developer-config.xml") + } + + // try to read from developer-config.xml instead (for development) + val styleNames = getArrayFromResources("benchmark_style_names") + val styleURLs = getArrayFromResources("benchmark_style_urls") + if (styleNames.isNotEmpty() && styleURLs.isNotEmpty()) { + return BenchmarkInputData( + styleNames = styleNames.toList(), + styleURLs = styleURLs.toList() + ) + } + + // return default + return BenchmarkInputData( + styleNames = listOf("MapLibre Demotiles"), + styleURLs = listOf("https://demotiles.maplibre.org/style.json") + ) + } + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_benchmark) + window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) + handler = Handler(mainLooper) setupToolbar() + inputData = getBenchmarkInputData() setupMapView(savedInstanceState) - - val styleNames = resources.getStringArray(applicationContext.resources.getIdentifier( - "benchmark_style_names", - "array", - applicationContext.packageName)) - val styleURLs = resources.getStringArray(applicationContext.resources.getIdentifier( - "benchmark_style_urls", - "array", - applicationContext.packageName)) - if (styleNames.isNotEmpty() && styleNames.size == styleURLs.size) { - styles = styleNames.zip(styleURLs) - } } private fun setupToolbar() { @@ -102,7 +179,7 @@ class BenchmarkActivity : AppCompatActivity() { mapView = findViewById(R.id.mapView) as MapView mapView.getMapAsync { maplibreMap: MapLibreMap -> this@BenchmarkActivity.maplibreMap = maplibreMap - maplibreMap.setStyle(styles[0].second) + maplibreMap.setStyle(inputData.styleURLs[0]) setFpsView(maplibreMap) // Start an animation on the map as well @@ -127,20 +204,20 @@ class BenchmarkActivity : AppCompatActivity() { override fun onFinish() { if (place == PLACES.size - 1) { // done with tour - results.addResult(styles[style].first, fpsStore) + results.addResult(inputData.styleNames[style], fpsStore) fpsStore.reset() println("FPS results $results") - if (style < styles.size - 1) { // continue with next style - maplibreMap.setStyle(styles[style + 1].second) + if (style < inputData.styleURLs.size - 1) { // continue with next style + maplibreMap.setStyle(inputData.styleURLs[style + 1]) flyTo(maplibreMap, 0, style + 1, zoom) } else if (runsLeft > 0) { // start over --runsLeft - maplibreMap.setStyle(styles[0].second) + maplibreMap.setStyle(inputData.styleURLs[0]) flyTo(maplibreMap, 0, 0, zoom) } else { - finish() + benchmarkDone() } return } @@ -196,6 +273,31 @@ class BenchmarkActivity : AppCompatActivity() { mapView.onLowMemory() } + private fun sendResults() { + val api = inputData.resultsAPI + if (api.isEmpty()) { + Logger.i(TAG, "Not sending results to API") + return + } + + val client = OkHttpClient() + + val payload = jsonPayload(results) + Logger.i(TAG, "Sending JSON payload to API: $payload") + + val request = Request.Builder() + .url(api) + .post( + Json.encodeToString(payload).toRequestBody("application/json".toMediaType())) + .build() + client.newCall(request).execute() + } + + private fun benchmarkDone() { + sendResults() + finish() + } + companion object { private val PLACES = arrayOf( LatLng(37.7749, -122.4194), // SF diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/org/maplibre/android/testapp/utils/BenchmarkUtils.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/org/maplibre/android/testapp/utils/BenchmarkUtils.kt new file mode 100644 index 000000000..ef0b820c1 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/org/maplibre/android/testapp/utils/BenchmarkUtils.kt @@ -0,0 +1,44 @@ +package org.maplibre.android.testapp.utils + +import java.util.ArrayList + +class FpsStore { + private val fpsValues = ArrayList(100000) + + fun add(fps: Double) { + fpsValues.add(fps) + } + + fun reset() { + fpsValues.clear() + } + + fun low1p(): Double { + fpsValues.sort() + return fpsValues.slice(0..(fpsValues.size / 100)).average() + } + + fun average(): Double { + return fpsValues.average() + } +} + +/** + * Result of single benchmark run + */ +data class BenchmarkResult(val average: Double, val low1p: Double) + +data class BenchmarkResults( + var resultsPerStyle: MutableMap> = mutableMapOf>().withDefault { emptyList() }) +{ + + fun addResult(styleName: String, fpsStore: FpsStore) { + val newResults = resultsPerStyle.getValue(styleName).plus( + BenchmarkResult( + fpsStore.average(), + fpsStore.low1p() + ) + ) + resultsPerStyle[styleName] = newResults + } +} \ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/org/maplibre/android/testapp/view/LockableBottomSheetBehavior.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/org/maplibre/android/testapp/view/LockableBottomSheetBehavior.kt index 716945aeb..e783ab5fe 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/org/maplibre/android/testapp/view/LockableBottomSheetBehavior.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/org/maplibre/android/testapp/view/LockableBottomSheetBehavior.kt @@ -16,7 +16,7 @@ class LockableBottomSheetBehavior(context: Context, attrs: AttributeS override fun onInterceptTouchEvent( parent: CoordinatorLayout, - child: V, + child: V & Any, event: MotionEvent ): Boolean { var handled = false @@ -26,7 +26,11 @@ class LockableBottomSheetBehavior(context: Context, attrs: AttributeS return handled } - override fun onTouchEvent(parent: CoordinatorLayout, child: V, event: MotionEvent): Boolean { + override fun onTouchEvent( + parent: CoordinatorLayout, + child: V & Any, + event: MotionEvent + ): Boolean { var handled = false if (!locked) { handled = super.onTouchEvent(parent, child, event) @@ -36,7 +40,7 @@ class LockableBottomSheetBehavior(context: Context, attrs: AttributeS override fun onStartNestedScroll( coordinatorLayout: CoordinatorLayout, - child: V, + child: V & Any, directTargetChild: View, target: View, nestedScrollAxes: Int @@ -56,7 +60,7 @@ class LockableBottomSheetBehavior(context: Context, attrs: AttributeS override fun onNestedPreScroll( coordinatorLayout: CoordinatorLayout, - child: V, + child: V & Any, target: View, dx: Int, dy: Int, @@ -67,7 +71,11 @@ class LockableBottomSheetBehavior(context: Context, attrs: AttributeS } } - override fun onStopNestedScroll(coordinatorLayout: CoordinatorLayout, child: V, target: View) { + override fun onStopNestedScroll( + coordinatorLayout: CoordinatorLayout, + child: V & Any, + target: View + ) { if (!locked) { super.onStopNestedScroll(coordinatorLayout, child, target) } @@ -75,7 +83,7 @@ class LockableBottomSheetBehavior(context: Context, attrs: AttributeS override fun onNestedPreFling( coordinatorLayout: CoordinatorLayout, - child: V, + child: V & Any, target: View, velocityX: Float, velocityY: Float diff --git a/platform/android/MapboxGLAndroidSDKTestApp/test-proguard-rules.pro b/platform/android/MapboxGLAndroidSDKTestApp/test-proguard-rules.pro new file mode 100644 index 000000000..93181ceaa --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/test-proguard-rules.pro @@ -0,0 +1,2 @@ +-dontwarn java.lang.ClassValue +-dontwarn javax.lang.model.element.Modifier \ No newline at end of file diff --git a/platform/android/build.gradle b/platform/android/build.gradle index 3107bea50..3db385e00 100644 --- a/platform/android/build.gradle +++ b/platform/android/build.gradle @@ -7,17 +7,18 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:8.0.2' + classpath 'com.android.tools.build:gradle:8.1.4' classpath dependenciesList.licensesPlugin - classpath dependenciesList.kotlinPlugin // classpath dependenciesList.jacocoPlugin classpath dependenciesList.gradleNexus + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21" } } plugins { id("io.github.gradle-nexus.publish-plugin") version "1.1.0" id("org.jmailen.kotlinter") version "3.13.0" apply false + id 'org.jetbrains.kotlin.android' version '1.9.21' apply false } allprojects { diff --git a/platform/android/gradle/dependencies.gradle b/platform/android/gradle/dependencies.gradle index 0d93a002b..d9eacb7d0 100644 --- a/platform/android/gradle/dependencies.gradle +++ b/platform/android/gradle/dependencies.gradle @@ -7,7 +7,7 @@ ext { ] androidSdkVersions = [ - buildToolsVersion: '31.0.0', + buildToolsVersion: '33.0.1', ndkVersion : '25.1.8937393', cmakeVersion : '3.18.1+', ] @@ -34,7 +34,7 @@ ext { robolectric : '4.9.1', timber : '5.0.1', okhttp : '4.11.0', - kotlin : '1.7.20', + kotlin : '1.9.21', licenses : '0.8.80', lint : '30.3.1', // jacoco : '0.8.5', @@ -78,7 +78,6 @@ ext { okhttp3 : "com.squareup.okhttp3:okhttp:${versions.okhttp}", leakCanary : "com.squareup.leakcanary:leakcanary-android:${versions.leakCanary}", - kotlinLib : "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}", kotlinPlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}", licensesPlugin : "com.jaredsburrows:gradle-license-plugin:${versions.licenses}", // jacocoPlugin : "org.jacoco:org.jacoco.core:${versions.jacoco}", diff --git a/platform/android/gradle/native-build.gradle b/platform/android/gradle/native-build.gradle index 5c66f466f..cf27a1cc4 100644 --- a/platform/android/gradle/native-build.gradle +++ b/platform/android/gradle/native-build.gradle @@ -3,8 +3,6 @@ ext.nativeBuild = { nativeTargets -> ndkVersion androidSdkVersions.ndkVersion buildToolsVersion androidSdkVersions.buildToolsVersion - defaultPublishConfig project.hasProperty("mapbox.buildtype") ? project.getProperty("mapbox.buildtype") : "debug" - // 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 // added. When another ABI is specified explicitly, we're just going to build that ABI. In all other diff --git a/test/android/app/build.gradle b/test/android/app/build.gradle index 761186151..7a873df20 100644 --- a/test/android/app/build.gradle +++ b/test/android/app/build.gradle @@ -1,6 +1,8 @@ apply plugin: 'com.android.application' android { + namespace "android.app" + compileSdkVersion 33 defaultConfig { diff --git a/test/android/build.gradle b/test/android/build.gradle index de7242684..547d12de1 100644 --- a/test/android/build.gradle +++ b/test/android/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:8.1.1' } }