android: update AGP and Gradle dependencies (#4245)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
alias(libs.plugins.kotlinter)
|
||||
alias(libs.plugins.dokka)
|
||||
id("com.android.library")
|
||||
id("com.jaredsburrows.license")
|
||||
kotlin("android")
|
||||
id("maplibre.download-vulkan-validation")
|
||||
id("maplibre.gradle-checkstyle")
|
||||
id("maplibre.gradle-dependencies-graph")
|
||||
@@ -38,13 +36,15 @@ dependencies {
|
||||
|
||||
dokka {
|
||||
moduleName.set("MapLibre Native Android")
|
||||
val dokkaVariantName = "openglRelease"
|
||||
|
||||
dokkaSourceSets {
|
||||
main {
|
||||
configureEach {
|
||||
suppress.set(name != dokkaVariantName)
|
||||
includes.from("Module.md")
|
||||
|
||||
sourceLink {
|
||||
remoteUrl("https://github.com/maplibre/maplibre-native/tree/main/platform/android/")
|
||||
remoteUrl.set(uri("https://github.com/maplibre/maplibre-native/tree/main/platform/android/"))
|
||||
localDirectory.set(rootDir)
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@ android {
|
||||
defaultConfig {
|
||||
compileSdk = 34
|
||||
minSdk = 23
|
||||
targetSdk = 33
|
||||
buildConfigField("String", "GIT_REVISION_SHORT", "\"${getGitRevision()}\"")
|
||||
buildConfigField("String", "GIT_REVISION", "\"${getGitRevision(false)}\"")
|
||||
buildConfigField(
|
||||
@@ -134,7 +133,7 @@ android {
|
||||
nativeBuild(nativeTargets)
|
||||
|
||||
// Avoid naming conflicts, force usage of prefix
|
||||
resourcePrefix("maplibre_")
|
||||
resourcePrefix = "maplibre_"
|
||||
|
||||
sourceSets {
|
||||
getByName("main") {
|
||||
@@ -150,12 +149,14 @@ android {
|
||||
// http://robolectric.org/migrating/#migrating-to-40
|
||||
isIncludeAndroidResources = true
|
||||
}
|
||||
targetSdk = 33
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
isTestCoverageEnabled = false
|
||||
isJniDebuggable = true
|
||||
enableUnitTestCoverage = false
|
||||
enableAndroidTestCoverage = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +172,7 @@ android {
|
||||
"WrongThreadInterprocedural"
|
||||
)
|
||||
warningsAsErrors = false
|
||||
targetSdk = 33
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
@@ -182,16 +184,6 @@ android {
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "11"
|
||||
}
|
||||
}
|
||||
|
||||
licenseReport {
|
||||
generateHtmlReport = false
|
||||
generateJsonReport = true
|
||||
copyHtmlReportToAssets = false
|
||||
copyJsonReportToAssets = false
|
||||
}
|
||||
|
||||
fun getGitRevision(shortRev: Boolean = true): String {
|
||||
|
||||
@@ -7,7 +7,6 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.maplibre.android.MapStrictMode;
|
||||
import org.maplibre.android.MapLibre;
|
||||
import org.maplibre.android.log.Logger;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -17,16 +16,18 @@ class LocalRequestTask extends AsyncTask<String, Void, byte[]> {
|
||||
|
||||
private static final String TAG = "Mbgl-LocalRequestTask";
|
||||
|
||||
private final AssetManager assets;
|
||||
private OnLocalRequestResponse requestResponse;
|
||||
|
||||
LocalRequestTask(OnLocalRequestResponse requestResponse) {
|
||||
LocalRequestTask(@NonNull AssetManager assets, OnLocalRequestResponse requestResponse) {
|
||||
this.assets = assets;
|
||||
this.requestResponse = requestResponse;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected byte[] doInBackground(String... strings) {
|
||||
return loadFile(MapLibre.getApplicationContext().getAssets(),
|
||||
return loadFile(assets,
|
||||
"integration/" + strings[0]
|
||||
.substring(8)
|
||||
.replaceAll("%20", " ")
|
||||
|
||||
@@ -61,7 +61,7 @@ public class NativeHttpRequest implements HttpResponder {
|
||||
}
|
||||
|
||||
private void executeLocalRequest(String resourceUrl) {
|
||||
new LocalRequestTask(new LocalRequestTask.OnLocalRequestResponse() {
|
||||
new LocalRequestTask(MapLibre.getApplicationContext().getAssets(), new LocalRequestTask.OnLocalRequestResponse() {
|
||||
@Override
|
||||
public void onResponse(@Nullable byte[] bytes) {
|
||||
if (bytes != null) {
|
||||
|
||||
Reference in New Issue
Block a user