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 {
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
alias(libs.plugins.kotlinter)
|
alias(libs.plugins.kotlinter)
|
||||||
alias(libs.plugins.dokka)
|
alias(libs.plugins.dokka)
|
||||||
id("com.android.library")
|
|
||||||
id("com.jaredsburrows.license")
|
|
||||||
kotlin("android")
|
|
||||||
id("maplibre.download-vulkan-validation")
|
id("maplibre.download-vulkan-validation")
|
||||||
id("maplibre.gradle-checkstyle")
|
id("maplibre.gradle-checkstyle")
|
||||||
id("maplibre.gradle-dependencies-graph")
|
id("maplibre.gradle-dependencies-graph")
|
||||||
@@ -38,13 +36,15 @@ dependencies {
|
|||||||
|
|
||||||
dokka {
|
dokka {
|
||||||
moduleName.set("MapLibre Native Android")
|
moduleName.set("MapLibre Native Android")
|
||||||
|
val dokkaVariantName = "openglRelease"
|
||||||
|
|
||||||
dokkaSourceSets {
|
dokkaSourceSets {
|
||||||
main {
|
configureEach {
|
||||||
|
suppress.set(name != dokkaVariantName)
|
||||||
includes.from("Module.md")
|
includes.from("Module.md")
|
||||||
|
|
||||||
sourceLink {
|
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)
|
localDirectory.set(rootDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +61,6 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
compileSdk = 34
|
compileSdk = 34
|
||||||
minSdk = 23
|
minSdk = 23
|
||||||
targetSdk = 33
|
|
||||||
buildConfigField("String", "GIT_REVISION_SHORT", "\"${getGitRevision()}\"")
|
buildConfigField("String", "GIT_REVISION_SHORT", "\"${getGitRevision()}\"")
|
||||||
buildConfigField("String", "GIT_REVISION", "\"${getGitRevision(false)}\"")
|
buildConfigField("String", "GIT_REVISION", "\"${getGitRevision(false)}\"")
|
||||||
buildConfigField(
|
buildConfigField(
|
||||||
@@ -134,7 +133,7 @@ android {
|
|||||||
nativeBuild(nativeTargets)
|
nativeBuild(nativeTargets)
|
||||||
|
|
||||||
// Avoid naming conflicts, force usage of prefix
|
// Avoid naming conflicts, force usage of prefix
|
||||||
resourcePrefix("maplibre_")
|
resourcePrefix = "maplibre_"
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
getByName("main") {
|
getByName("main") {
|
||||||
@@ -150,12 +149,14 @@ android {
|
|||||||
// http://robolectric.org/migrating/#migrating-to-40
|
// http://robolectric.org/migrating/#migrating-to-40
|
||||||
isIncludeAndroidResources = true
|
isIncludeAndroidResources = true
|
||||||
}
|
}
|
||||||
|
targetSdk = 33
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
isTestCoverageEnabled = false
|
|
||||||
isJniDebuggable = true
|
isJniDebuggable = true
|
||||||
|
enableUnitTestCoverage = false
|
||||||
|
enableAndroidTestCoverage = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,6 +172,7 @@ android {
|
|||||||
"WrongThreadInterprocedural"
|
"WrongThreadInterprocedural"
|
||||||
)
|
)
|
||||||
warningsAsErrors = false
|
warningsAsErrors = false
|
||||||
|
targetSdk = 33
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
@@ -182,16 +184,6 @@ android {
|
|||||||
targetCompatibility = JavaVersion.VERSION_11
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "11"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
licenseReport {
|
|
||||||
generateHtmlReport = false
|
|
||||||
generateJsonReport = true
|
|
||||||
copyHtmlReportToAssets = false
|
|
||||||
copyJsonReportToAssets = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getGitRevision(shortRev: Boolean = true): String {
|
fun getGitRevision(shortRev: Boolean = true): String {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import org.maplibre.android.MapStrictMode;
|
import org.maplibre.android.MapStrictMode;
|
||||||
import org.maplibre.android.MapLibre;
|
|
||||||
import org.maplibre.android.log.Logger;
|
import org.maplibre.android.log.Logger;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -17,16 +16,18 @@ class LocalRequestTask extends AsyncTask<String, Void, byte[]> {
|
|||||||
|
|
||||||
private static final String TAG = "Mbgl-LocalRequestTask";
|
private static final String TAG = "Mbgl-LocalRequestTask";
|
||||||
|
|
||||||
|
private final AssetManager assets;
|
||||||
private OnLocalRequestResponse requestResponse;
|
private OnLocalRequestResponse requestResponse;
|
||||||
|
|
||||||
LocalRequestTask(OnLocalRequestResponse requestResponse) {
|
LocalRequestTask(@NonNull AssetManager assets, OnLocalRequestResponse requestResponse) {
|
||||||
|
this.assets = assets;
|
||||||
this.requestResponse = requestResponse;
|
this.requestResponse = requestResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
protected byte[] doInBackground(String... strings) {
|
protected byte[] doInBackground(String... strings) {
|
||||||
return loadFile(MapLibre.getApplicationContext().getAssets(),
|
return loadFile(assets,
|
||||||
"integration/" + strings[0]
|
"integration/" + strings[0]
|
||||||
.substring(8)
|
.substring(8)
|
||||||
.replaceAll("%20", " ")
|
.replaceAll("%20", " ")
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class NativeHttpRequest implements HttpResponder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void executeLocalRequest(String resourceUrl) {
|
private void executeLocalRequest(String resourceUrl) {
|
||||||
new LocalRequestTask(new LocalRequestTask.OnLocalRequestResponse() {
|
new LocalRequestTask(MapLibre.getApplicationContext().getAssets(), new LocalRequestTask.OnLocalRequestResponse() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(@Nullable byte[] bytes) {
|
public void onResponse(@Nullable byte[] bytes) {
|
||||||
if (bytes != null) {
|
if (bytes != null) {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.kotlinter)
|
alias(libs.plugins.kotlinter)
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
alias(libs.plugins.kotlinAndroid)
|
|
||||||
alias(libs.plugins.kotlinPluginSerialization)
|
alias(libs.plugins.kotlinPluginSerialization)
|
||||||
id("maplibre.gradle-make")
|
id("maplibre.gradle-make")
|
||||||
id("maplibre.gradle-config")
|
id("maplibre.gradle-config")
|
||||||
@@ -43,12 +42,12 @@ android {
|
|||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
getByName("debug") {
|
getByName("debug") {
|
||||||
|
manifestPlaceholders += mapOf()
|
||||||
isJniDebuggable = true
|
isJniDebuggable = true
|
||||||
isDebuggable = true
|
isDebuggable = true
|
||||||
isTestCoverageEnabled = true
|
|
||||||
isMinifyEnabled = false
|
isMinifyEnabled = false
|
||||||
isShrinkResources = false
|
isShrinkResources = false
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
|
||||||
packaging {
|
packaging {
|
||||||
jniLibs {
|
jniLibs {
|
||||||
@@ -57,13 +56,15 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildConfigField("String", "SENTRY_DSN", "\"" + (System.getenv("SENTRY_DSN") ?: "") + "\"")
|
buildConfigField("String", "SENTRY_DSN", "\"" + (System.getenv("SENTRY_DSN") ?: "") + "\"")
|
||||||
|
enableUnitTestCoverage = true
|
||||||
|
enableAndroidTestCoverage = true
|
||||||
manifestPlaceholders["SENTRY_DSN"] = System.getenv("SENTRY_DSN") ?: ""
|
manifestPlaceholders["SENTRY_DSN"] = System.getenv("SENTRY_DSN") ?: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
getByName("release") {
|
getByName("release") {
|
||||||
isMinifyEnabled = true
|
isMinifyEnabled = true
|
||||||
isShrinkResources = true
|
isShrinkResources = true
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
testProguardFiles("test-proguard-rules.pro")
|
testProguardFiles("test-proguard-rules.pro")
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
|
|
||||||
@@ -144,6 +145,7 @@ dependencies {
|
|||||||
implementation(libs.maplibreJavaTurf)
|
implementation(libs.maplibreJavaTurf)
|
||||||
|
|
||||||
implementation(libs.supportRecyclerView)
|
implementation(libs.supportRecyclerView)
|
||||||
|
implementation(libs.supportPrint)
|
||||||
implementation(libs.supportDesign)
|
implementation(libs.supportDesign)
|
||||||
implementation(libs.supportConstraintLayout)
|
implementation(libs.supportConstraintLayout)
|
||||||
implementation(libs.kotlinxSerializationJson)
|
implementation(libs.kotlinxSerializationJson)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.android.tools.build:gradle:8.6.1")
|
implementation("com.android.tools.build:gradle:9.1.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "org.maplibre"
|
group = "org.maplibre"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,23 +1,40 @@
|
|||||||
package org.maplibre
|
package org.maplibre
|
||||||
|
|
||||||
import com.android.build.gradle.BaseExtension
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.kotlin.dsl.getByType
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
private fun configureCcacheArguments(arguments: MutableList<String>) {
|
||||||
|
val cacheToolPath = findCacheToolPath()
|
||||||
|
if (cacheToolPath != null) {
|
||||||
|
arguments.add("-DCMAKE_CXX_COMPILER_LAUNCHER=$cacheToolPath")
|
||||||
|
println("ccache enabled at: $cacheToolPath")
|
||||||
|
} else {
|
||||||
|
println("ccache not found on the system, continuing without it.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun configureCcache(project: Project) {
|
fun configureCcache(project: Project) {
|
||||||
project.extensions.getByType<BaseExtension>().run {
|
val appExtension = project.extensions.findByType(ApplicationExtension::class.java)
|
||||||
defaultConfig {
|
if (appExtension != null) {
|
||||||
|
appExtension.defaultConfig {
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
val cacheToolPath = findCacheToolPath()
|
configureCcacheArguments(arguments)
|
||||||
if (cacheToolPath != null) {
|
}
|
||||||
arguments.add("-DCMAKE_CXX_COMPILER_LAUNCHER=$cacheToolPath")
|
}
|
||||||
println("ccache enabled at: $cacheToolPath")
|
}
|
||||||
} else {
|
return
|
||||||
println("ccache not found on the system, continuing without it.")
|
}
|
||||||
}
|
|
||||||
|
val libraryExtension = project.extensions.findByType(LibraryExtension::class.java)
|
||||||
|
if (libraryExtension != null) {
|
||||||
|
libraryExtension.defaultConfig {
|
||||||
|
externalNativeBuild {
|
||||||
|
cmake {
|
||||||
|
configureCcacheArguments(arguments)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.kotlinter) apply false
|
alias(libs.plugins.kotlinter) apply false
|
||||||
alias(libs.plugins.kotlinAndroid) apply false
|
|
||||||
id("com.jaredsburrows.license") version "0.9.8" apply false
|
|
||||||
id("maplibre.dependencies")
|
id("maplibre.dependencies")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.vanniktech:gradle-dependency-graph-generator-plugin:0.3.0")
|
implementation("com.vanniktech:gradle-dependency-graph-generator-plugin:0.3.0")
|
||||||
implementation("com.vanniktech:gradle-maven-publish-plugin:0.34.0")
|
implementation("com.vanniktech:gradle-maven-publish-plugin:0.34.0")
|
||||||
implementation("com.android.tools.build:gradle:8.6.0")
|
implementation("com.android.application:com.android.application.gradle.plugin:9.1.1")
|
||||||
implementation("com.android.application:com.android.application.gradle.plugin:8.6.0")
|
|
||||||
implementation("commons-collections:commons-collections:3.2.2")
|
implementation("commons-collections:commons-collections:3.2.2")
|
||||||
implementation("io.sentry:sentry-android-gradle-plugin:5.9.0")
|
implementation("io.sentry:sentry-android-gradle-plugin:5.9.0")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import com.android.build.gradle.BaseExtension
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.kotlin.dsl.getByType
|
|
||||||
|
|
||||||
|
|
||||||
open class DownloadVulkanValidationPlugin : Plugin<Project> {
|
open class DownloadVulkanValidationPlugin : Plugin<Project> {
|
||||||
@@ -10,10 +10,23 @@ open class DownloadVulkanValidationPlugin : Plugin<Project> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun Project.configureVulkanJniLibs() = this.extensions.getByType<BaseExtension>().run {
|
internal fun Project.configureVulkanJniLibs() {
|
||||||
sourceSets {
|
val appExtension = extensions.findByType(ApplicationExtension::class.java)
|
||||||
getByName("vulkan") {
|
if (appExtension != null) {
|
||||||
jniLibs.srcDir(tasks.named("unzip").get().outputs.files.asFileTree)
|
appExtension.sourceSets {
|
||||||
|
getByName("vulkan") {
|
||||||
|
jniLibs.srcDir(tasks.named("unzip").get().outputs.files.asFileTree)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val libraryExtension = extensions.findByType(LibraryExtension::class.java)
|
||||||
|
if (libraryExtension != null) {
|
||||||
|
libraryExtension.sourceSets {
|
||||||
|
getByName("vulkan") {
|
||||||
|
jniLibs.srcDir(tasks.named("unzip").get().outputs.files.asFileTree)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import com.android.build.gradle.BaseExtension
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.kotlin.dsl.getByType
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
open class NativeBuildPlugin : Plugin<Project> {
|
open class NativeBuildPlugin : Plugin<Project> {
|
||||||
override fun apply(project: Project) {
|
override fun apply(project: Project) {
|
||||||
@@ -19,8 +18,7 @@ open class NativeBuildExtension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun Project.nativeBuild(nativeTargets: List<String>) =
|
fun Project.nativeBuild(nativeTargets: List<String>) =
|
||||||
this.extensions.getByType<BaseExtension>().run {
|
run {
|
||||||
|
|
||||||
// We sometimes want to invoke Gradle without building a native dependency, e.g. when we just want
|
// 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
|
// 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
|
// added. When another ABI is specified explicitly, we're just going to build that ABI. In all other
|
||||||
@@ -32,65 +30,112 @@ fun Project.nativeBuild(nativeTargets: List<String>) =
|
|||||||
// When building from Android Studio, gradle.properties sets `android.buildOnlyTargetAbi=true` so that
|
// When building from Android Studio, gradle.properties sets `android.buildOnlyTargetAbi=true` so that
|
||||||
// only the architecture for the device you're running on gets built.
|
// only the architecture for the device you're running on gets built.
|
||||||
|
|
||||||
|
|
||||||
var abi = "all"
|
var abi = "all"
|
||||||
if (!project.hasProperty("android.injected.invoked.from.ide") && project.hasProperty("maplibre.abis")) {
|
if (!project.hasProperty("android.injected.invoked.from.ide") && project.hasProperty("maplibre.abis")) {
|
||||||
abi = project.property("maplibre.abis") as String
|
abi = project.property("maplibre.abis") as String
|
||||||
}
|
}
|
||||||
|
|
||||||
if (abi != "none") {
|
|
||||||
externalNativeBuild {
|
|
||||||
cmake {
|
|
||||||
path = file("../MapLibreAndroid/src/cpp/CMakeLists.txt")
|
|
||||||
version = Versions.cmakeVersion
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine the C++ STL being used.
|
|
||||||
var stl = "c++_static"
|
var stl = "c++_static"
|
||||||
if (project.hasProperty("mapbox.stl")) {
|
if (project.hasProperty("mapbox.stl")) {
|
||||||
stl = project.property("mapbox.stl") as String
|
stl = project.property("mapbox.stl") as String
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
fun configureNativeBuildBlock(setup: () -> Unit) {
|
||||||
if (abi != "none") {
|
setup()
|
||||||
externalNativeBuild {
|
}
|
||||||
cmake {
|
|
||||||
arguments.addAll(
|
|
||||||
listOf(
|
|
||||||
"-DANDROID_TOOLCHAIN=clang",
|
|
||||||
"-DANDROID_STL=$stl",
|
|
||||||
"-DANDROID_CPP_FEATURES=exceptions",
|
|
||||||
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
cFlags.add("-Qunused-arguments")
|
val appExtension = extensions.findByType(ApplicationExtension::class.java)
|
||||||
cppFlags.add("-Qunused-arguments")
|
if (appExtension != null) {
|
||||||
|
configureNativeBuildBlock {
|
||||||
for (target in nativeTargets) {
|
if (abi != "none") {
|
||||||
targets(target)
|
appExtension.externalNativeBuild {
|
||||||
|
cmake {
|
||||||
|
path = file("../MapLibreAndroid/src/cpp/CMakeLists.txt")
|
||||||
|
version = Versions.cmakeVersion
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (abi != "all") {
|
appExtension.defaultConfig {
|
||||||
abiFilters.addAll(abi.split(" "))
|
if (abi != "none") {
|
||||||
} else {
|
externalNativeBuild {
|
||||||
if (project.hasProperty("android.injected.invoked.from.ide") && project.hasProperty(
|
cmake {
|
||||||
"android.injected.build.abi"
|
arguments.addAll(
|
||||||
)
|
|
||||||
) {
|
|
||||||
abi = project.property("android.injected.build.abi") as String
|
|
||||||
abiFilters.add(abi.split(",").first())
|
|
||||||
} else {
|
|
||||||
abiFilters.addAll(
|
|
||||||
listOf(
|
listOf(
|
||||||
"armeabi-v7a",
|
"-DANDROID_TOOLCHAIN=clang",
|
||||||
"x86",
|
"-DANDROID_STL=$stl",
|
||||||
"arm64-v8a",
|
"-DANDROID_CPP_FEATURES=exceptions",
|
||||||
"x86_64"
|
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cFlags.add("-Qunused-arguments")
|
||||||
|
cppFlags.add("-Qunused-arguments")
|
||||||
|
|
||||||
|
for (target in nativeTargets) {
|
||||||
|
targets(target)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (abi != "all") {
|
||||||
|
abiFilters.addAll(abi.split(" "))
|
||||||
|
} else {
|
||||||
|
if (project.hasProperty("android.injected.invoked.from.ide") && project.hasProperty("android.injected.build.abi")) {
|
||||||
|
abi = project.property("android.injected.build.abi") as String
|
||||||
|
abiFilters.add(abi.split(",").first())
|
||||||
|
} else {
|
||||||
|
abiFilters.addAll(listOf("armeabi-v7a", "x86", "arm64-v8a", "x86_64"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val libraryExtension = extensions.findByType(LibraryExtension::class.java)
|
||||||
|
if (libraryExtension != null) {
|
||||||
|
configureNativeBuildBlock {
|
||||||
|
if (abi != "none") {
|
||||||
|
libraryExtension.externalNativeBuild {
|
||||||
|
cmake {
|
||||||
|
path = file("../MapLibreAndroid/src/cpp/CMakeLists.txt")
|
||||||
|
version = Versions.cmakeVersion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
libraryExtension.defaultConfig {
|
||||||
|
if (abi != "none") {
|
||||||
|
externalNativeBuild {
|
||||||
|
cmake {
|
||||||
|
arguments.addAll(
|
||||||
|
listOf(
|
||||||
|
"-DANDROID_TOOLCHAIN=clang",
|
||||||
|
"-DANDROID_STL=$stl",
|
||||||
|
"-DANDROID_CPP_FEATURES=exceptions",
|
||||||
|
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
cFlags.add("-Qunused-arguments")
|
||||||
|
cppFlags.add("-Qunused-arguments")
|
||||||
|
|
||||||
|
for (target in nativeTargets) {
|
||||||
|
targets(target)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (abi != "all") {
|
||||||
|
abiFilters.addAll(abi.split(" "))
|
||||||
|
} else {
|
||||||
|
if (project.hasProperty("android.injected.invoked.from.ide") && project.hasProperty("android.injected.build.abi")) {
|
||||||
|
abi = project.property("android.injected.build.abi") as String
|
||||||
|
abiFilters.add(abi.split(",").first())
|
||||||
|
} else {
|
||||||
|
abiFilters.addAll(listOf("armeabi-v7a", "x86", "arm64-v8a", "x86_64"))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,14 @@
|
|||||||
import com.android.build.gradle.AppExtension
|
import com.android.build.gradle.AppExtension
|
||||||
import java.io.ByteArrayOutputStream
|
import javax.inject.Inject
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.process.ExecOperations
|
||||||
|
import java.io.ByteArrayOutputStream
|
||||||
|
|
||||||
|
abstract class SentryConditionalPlugin @Inject constructor(
|
||||||
|
private val execOperations: ExecOperations
|
||||||
|
) : Plugin<Project> {
|
||||||
|
|
||||||
class SentryConditionalPlugin : Plugin<Project> {
|
|
||||||
override fun apply(project: Project) {
|
override fun apply(project: Project) {
|
||||||
val sentryProject = System.getenv("SENTRY_PROJECT")
|
val sentryProject = System.getenv("SENTRY_PROJECT")
|
||||||
|
|
||||||
@@ -67,7 +72,7 @@ class SentryConditionalPlugin : Plugin<Project> {
|
|||||||
project.afterEvaluate {
|
project.afterEvaluate {
|
||||||
val commitHash = ByteArrayOutputStream()
|
val commitHash = ByteArrayOutputStream()
|
||||||
|
|
||||||
project.exec {
|
execOperations.exec {
|
||||||
commandLine("git", "rev-parse", "HEAD")
|
commandLine("git", "rev-parse", "HEAD")
|
||||||
standardOutput = commitHash
|
standardOutput = commitHash
|
||||||
workingDir = project.rootDir
|
workingDir = project.rootDir
|
||||||
@@ -75,7 +80,8 @@ class SentryConditionalPlugin : Plugin<Project> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
androidExtension.applicationVariants.forEach { variant ->
|
androidExtension.applicationVariants.forEach { variant ->
|
||||||
variant.mergedFlavor.manifestPlaceholders["SENTRY_ENV"] = "${variant.name}-$commitHash"
|
variant.mergedFlavor.manifestPlaceholders["SENTRY_ENV"] =
|
||||||
|
"${variant.name}-${commitHash.toString().trim()}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,28 @@
|
|||||||
|
import org.gradle.process.ExecOperations
|
||||||
|
import javax.inject.Inject
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("maplibre.dependencies")
|
id("maplibre.dependencies")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("androidNitpick") {
|
abstract class AndroidNitpickTask @Inject constructor(
|
||||||
doLast {
|
private val execOperations: ExecOperations
|
||||||
println("Running android nitpick script")
|
) : DefaultTask() {
|
||||||
verifyLicenseGeneration()
|
|
||||||
|
@get:Internal
|
||||||
|
abstract val workingDirectory: DirectoryProperty
|
||||||
|
|
||||||
|
@TaskAction
|
||||||
|
fun run() {
|
||||||
|
logger.lifecycle("Running android nitpick script")
|
||||||
|
logger.lifecycle("Verify license generation with git diff...")
|
||||||
|
execOperations.exec {
|
||||||
|
workingDir = workingDirectory.get().asFile
|
||||||
|
commandLine("python3", "scripts/validate-license.py")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun verifyLicenseGeneration() {
|
tasks.register<AndroidNitpickTask>("androidNitpick") {
|
||||||
println("Verify license generation with git diff...")
|
workingDirectory.set(rootDir)
|
||||||
exec {
|
|
||||||
workingDir(rootDir)
|
|
||||||
commandLine("python3", "scripts/validate-license.py")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
|
import com.android.build.api.variant.LibraryAndroidComponentsExtension
|
||||||
import org.gradle.api.Task
|
import org.gradle.api.Task
|
||||||
|
import org.gradle.api.tasks.compile.JavaCompile
|
||||||
|
import org.gradle.external.javadoc.StandardJavadocDocletOptions
|
||||||
import org.gradle.kotlin.dsl.get
|
import org.gradle.kotlin.dsl.get
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
@@ -10,6 +14,15 @@ plugins {
|
|||||||
id("maplibre.artifact-settings")
|
id("maplibre.artifact-settings")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val androidComponents = extensions.getByType<LibraryAndroidComponentsExtension>()
|
||||||
|
val androidLibrary = extensions.getByType<LibraryExtension>()
|
||||||
|
|
||||||
|
androidLibrary.publishing {
|
||||||
|
singleVariant("vulkanRelease")
|
||||||
|
singleVariant("vulkanDebug")
|
||||||
|
singleVariant("openglRelease")
|
||||||
|
singleVariant("openglDebug")
|
||||||
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
mavenPublishing {
|
mavenPublishing {
|
||||||
@@ -32,22 +45,23 @@ gradle.projectsEvaluated {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<Javadoc>("androidJavadocs") {
|
tasks.register<Javadoc>("androidJavadocs") {
|
||||||
source = fileTree(android.sourceSets.getByName("main").java.srcDirs)
|
source = fileTree("src/main/java")
|
||||||
classpath = files(android.bootClasspath)
|
classpath = files()
|
||||||
isFailOnError = false
|
isFailOnError = false
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<Jar>("androidJavadocsJar") {
|
tasks.register<Jar>("androidJavadocsJar") {
|
||||||
archiveClassifier.set("javadoc")
|
archiveClassifier.set("javadoc")
|
||||||
from(tasks.named("androidJavadocs", Javadoc::class.java).get().destinationDir)
|
from(tasks.named("androidJavadocs", Javadoc::class.java).map { it.destinationDir!! })
|
||||||
|
dependsOn(tasks.named("androidJavadocs"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<Jar>("androidSourcesJar") {
|
tasks.register<Jar>("androidSourcesJar") {
|
||||||
archiveClassifier.set("sources")
|
archiveClassifier.set("sources")
|
||||||
from(android.sourceSets.getByName("main").java.srcDirs)
|
from("src/main/java")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<Javadoc> {
|
tasks.withType<Javadoc>().configureEach {
|
||||||
options.encoding = "UTF-8"
|
options.encoding = "UTF-8"
|
||||||
(options as StandardJavadocDocletOptions).apply {
|
(options as StandardJavadocDocletOptions).apply {
|
||||||
charSet = "UTF-8"
|
charSet = "UTF-8"
|
||||||
@@ -55,7 +69,6 @@ tasks.withType<Javadoc> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
add("archives", tasks.named("androidSourcesJar"))
|
add("archives", tasks.named("androidSourcesJar"))
|
||||||
add("archives", tasks.named("androidJavadocsJar"))
|
add("archives", tasks.named("androidJavadocsJar"))
|
||||||
@@ -80,7 +93,17 @@ fun configureMavenPublication(
|
|||||||
artifactId = "${project.extra["mapLibreArtifactId"]}$artifactIdPostfix"
|
artifactId = "${project.extra["mapLibreArtifactId"]}$artifactIdPostfix"
|
||||||
version = project.version.toString()
|
version = project.version.toString()
|
||||||
|
|
||||||
from(components["${renderer}${buildType}"])
|
val componentName = "${renderer}${buildType}"
|
||||||
|
val component = components.findByName(componentName)
|
||||||
|
?: components.find { it.name.equals(componentName, ignoreCase = true) }
|
||||||
|
if (component != null) {
|
||||||
|
from(component)
|
||||||
|
} else {
|
||||||
|
project.logger.warn(
|
||||||
|
"Skipping publication '$publicationName' because component '$componentName' was not found. " +
|
||||||
|
"Available components: ${components.map { it.name }.sorted()}"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
pom {
|
pom {
|
||||||
name.set("${project.extra["mapLibreArtifactTitle"]}$descriptionPostfix")
|
name.set("${project.extra["mapLibreArtifactTitle"]}$descriptionPostfix")
|
||||||
@@ -110,7 +133,6 @@ fun configureMavenPublication(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
configureMavenPublication("vulkan", "defaultrelease", "", "")
|
configureMavenPublication("vulkan", "defaultrelease", "", "")
|
||||||
configureMavenPublication("vulkan", "defaultdebug", "-debug", " (Debug)", "Debug")
|
configureMavenPublication("vulkan", "defaultdebug", "-debug", " (Debug)", "Debug")
|
||||||
@@ -123,13 +145,20 @@ afterEvaluate {
|
|||||||
configureMavenPublication("opengl", "opengldebug", "-opengl-debug", " (OpenGL ES, Debug)", "Debug")
|
configureMavenPublication("opengl", "opengldebug", "-opengl-debug", " (OpenGL ES, Debug)", "Debug")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wire per-variant compile classpaths into the Javadoc task.
|
||||||
|
// Replaces the removed `android.libraryVariants` API with the new AndroidComponents API,
|
||||||
|
// looking up the generated JavaCompile task by its conventional name.
|
||||||
|
androidComponents.onVariants { variant ->
|
||||||
|
val capitalizedName = variant.name.replaceFirstChar {
|
||||||
|
if (it.isLowerCase()) it.titlecase(Locale.ROOT) else it.toString()
|
||||||
|
}
|
||||||
|
val javaCompileTaskName = "compile${capitalizedName}JavaWithJavac"
|
||||||
|
|
||||||
afterEvaluate {
|
tasks.named("androidJavadocs", Javadoc::class.java).configure {
|
||||||
android.libraryVariants.forEach { variant ->
|
val javaCompile = tasks.named(javaCompileTaskName, JavaCompile::class.java)
|
||||||
tasks.named("androidJavadocs", Javadoc::class.java).configure {
|
dependsOn(javaCompile)
|
||||||
doFirst {
|
doFirst {
|
||||||
classpath = classpath.plus(files(variant.javaCompileProvider.get().classpath))
|
classpath = classpath.plus(files(javaCompile.get().classpath))
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ systemProp.org.gradle.internal.http.connectionTimeout=360000
|
|||||||
systemProp.org.gradle.internal.http.socketTimeout=360000
|
systemProp.org.gradle.internal.http.socketTimeout=360000
|
||||||
org.gradle.jvmargs=-Xmx4096M
|
org.gradle.jvmargs=-Xmx4096M
|
||||||
android.nonTransitiveRClass=false
|
android.nonTransitiveRClass=false
|
||||||
android.nonFinalResIds=false
|
android.nonFinalResIds=true
|
||||||
android.injected.androidTest.leaveApksInstalledAfterRun=true
|
android.injected.androidTest.leaveApksInstalledAfterRun=true
|
||||||
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
|
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
|
||||||
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
|
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
|
||||||
|
|||||||
@@ -1,33 +1,30 @@
|
|||||||
[versions]
|
[versions]
|
||||||
mapLibreServices = "6.0.1"
|
mapLibreServices = "6.0.1"
|
||||||
constraintLayout = "2.1.4"
|
constraintLayout = "2.2.1"
|
||||||
interpolator = "1.0.0"
|
interpolator = "1.0.0"
|
||||||
recyclerView = "1.3.2"
|
recyclerView = "1.3.0"
|
||||||
material = "1.12.0"
|
material = "1.13.0"
|
||||||
uiAutomator = "2.3.0"
|
uiAutomator = "2.3.0"
|
||||||
espresso = "3.6.1"
|
espresso = "3.7.0"
|
||||||
testRunner = "1.2.1"
|
testRunner = "1.3.0"
|
||||||
testRules = "1.6.1"
|
testRules = "1.7.0"
|
||||||
fragment = "1.8.2"
|
fragment = "1.8.9"
|
||||||
annotation = "1.8.2"
|
annotation = "1.8.2"
|
||||||
|
androidxPrint = "1.1.0"
|
||||||
leakCanary = "2.14"
|
leakCanary = "2.14"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
mockito = "5.13.0"
|
mockito = "5.23.0"
|
||||||
mockk = "1.13.12"
|
mockk = "1.14.9"
|
||||||
robolectric = "4.13"
|
robolectric = "4.16.1"
|
||||||
timber = "5.0.1"
|
timber = "5.0.1"
|
||||||
okhttp = "4.12.0"
|
okhttp = "4.12.0"
|
||||||
kotlin = "2.0.20"
|
kotlin = "2.3.20"
|
||||||
licenses = "0.9.8"
|
lint = "32.1.1"
|
||||||
lint = "31.6.0"
|
|
||||||
appcenter = "1.5"
|
appcenter = "1.5"
|
||||||
commonsIO = "2.16.1"
|
commonsIO = "2.21.0"
|
||||||
assertj = "3.26.3"
|
assertj = "3.27.7"
|
||||||
gradleNexus = "2.0.0"
|
|
||||||
multidex = "2.0.1"
|
multidex = "2.0.1"
|
||||||
kotlinxCoroutines = { strictly = "[1.0, 2.0[" }
|
kotlinxCoroutines = "1.10.2"
|
||||||
|
|
||||||
androidGradlePlugin = "8.6.0"
|
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
kotlinxCoroutinesCore = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
|
kotlinxCoroutinesCore = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
|
||||||
@@ -57,6 +54,7 @@ supportConstraintLayout = { group = "androidx.constraintlayout", name = "constra
|
|||||||
interpolator = { group = "androidx.interpolator", name = "interpolator", version.ref = "interpolator" }
|
interpolator = { group = "androidx.interpolator", name = "interpolator", version.ref = "interpolator" }
|
||||||
supportDesign = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
supportDesign = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||||
multidex = { group = "androidx.multidex", name = "multidex", version.ref = "multidex" }
|
multidex = { group = "androidx.multidex", name = "multidex", version.ref = "multidex" }
|
||||||
|
supportPrint = { group = "androidx.print", name = "print", version.ref = "androidxPrint" }
|
||||||
|
|
||||||
appCenter = { group = "com.microsoft.appcenter", name = "espresso-test-extension", version.ref = "appcenter" }
|
appCenter = { group = "com.microsoft.appcenter", name = "espresso-test-extension", version.ref = "appcenter" }
|
||||||
commonsIO = { group = "commons-io", name = "commons-io", version.ref = "commonsIO" }
|
commonsIO = { group = "commons-io", name = "commons-io", version.ref = "commonsIO" }
|
||||||
@@ -64,28 +62,16 @@ timber = { group = "com.jakewharton.timber", name = "timber", version.ref = "tim
|
|||||||
okhttp3 = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
|
okhttp3 = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
|
||||||
leakCanary = { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "leakCanary" }
|
leakCanary = { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "leakCanary" }
|
||||||
|
|
||||||
kotlinPlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
|
|
||||||
licensesPlugin = { group = "com.jaredsburrows", name = "gradle-license-plugin", version.ref = "licenses" }
|
|
||||||
|
|
||||||
lint = { group = "com.android.tools.lint", name = "lint", version.ref = "lint" }
|
lint = { group = "com.android.tools.lint", name = "lint", version.ref = "lint" }
|
||||||
lintApi = { group = "com.android.tools.lint", name = "lint-api", version.ref = "lint" }
|
lintApi = { group = "com.android.tools.lint", name = "lint-api", version.ref = "lint" }
|
||||||
lintChecks = { group = "com.android.tools.lint", name = "lint-checks", version.ref = "lint" }
|
lintChecks = { group = "com.android.tools.lint", name = "lint-checks", version.ref = "lint" }
|
||||||
lintTests = { group = "com.android.tools.lint", name = "lint-tests", version.ref = "lint" }
|
lintTests = { group = "com.android.tools.lint", name = "lint-tests", version.ref = "lint" }
|
||||||
|
|
||||||
gradleNexus = { group = "io.github.gradle-nexus", name = "publish-plugin", version.ref = "gradleNexus" }
|
androidxTestExtJUnit = { group = "androidx.test.ext", name = "junit", version = "1.3.0" }
|
||||||
|
androidxTestCoreKtx = { group = "androidx.test", name = "core-ktx", version = "1.7.0" }
|
||||||
androidxTestExtJUnit = { group = "androidx.test.ext", name = "junit", version = "1.2.1" }
|
kotlinxSerializationJson = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.11.0" }
|
||||||
androidxTestCoreKtx = { group = "androidx.test", name = "core-ktx", version = "1.6.1" }
|
|
||||||
kotlinxSerializationJson = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.7.2" }
|
|
||||||
|
|
||||||
androidGradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
|
|
||||||
|
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
nexusPublishPlugin = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0" }
|
kotlinter = { id = "org.jmailen.kotlinter", version = "5.4.2" }
|
||||||
kotlinter = { id = "org.jmailen.kotlinter", version = "4.4.1" }
|
dokka = { id = "org.jetbrains.dokka", version = "2.2.0" }
|
||||||
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version = "2.0.20" }
|
kotlinPluginSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||||
dokka = { id = "org.jetbrains.dokka", version = "2.0.0-Beta" }
|
|
||||||
kotlinPluginSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version = "2.0.20" }
|
|
||||||
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
|
|
||||||
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ void android_main(struct android_app* app) {
|
|||||||
struct android_poll_source* source = nullptr;
|
struct android_poll_source* source = nullptr;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
ALooper_pollAll(-1, &outFd, &outEvents, reinterpret_cast<void**>(&source));
|
ALooper_pollOnce(-1, &outFd, &outEvents, reinterpret_cast<void**>(&source));
|
||||||
if (source != nullptr) {
|
if (source != nullptr) {
|
||||||
source->process(app, source);
|
source->process(app, source);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ void android_main(struct android_app* app) {
|
|||||||
struct android_poll_source* source = nullptr;
|
struct android_poll_source* source = nullptr;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
ALooper_pollAll(-1, &outFd, &outEvents, reinterpret_cast<void**>(&source));
|
ALooper_pollOnce(-1, &outFd, &outEvents, reinterpret_cast<void**>(&source));
|
||||||
if (source != nullptr) {
|
if (source != nullptr) {
|
||||||
source->process(app, source);
|
source->process(app, source);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.6.0" apply false
|
id("com.android.application") version "9.1.1" apply false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[versions]
|
[versions]
|
||||||
androidGradlePlugin = "8.6.0"
|
androidGradlePlugin = "8.13.2"
|
||||||
espresso = "3.6.1"
|
espresso = "3.6.1"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.6.0" apply false
|
id("com.android.application") version "9.1.1" apply false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
Reference in New Issue
Block a user