Remove hardcoded ccache Android build config (#3041)

This commit is contained in:
Bart Louwers
2024-11-26 14:32:47 +01:00
committed by GitHub
parent 7e1e1fbf06
commit ed8444433f
25 changed files with 652 additions and 251 deletions

View File

@@ -1,79 +0,0 @@
apply plugin: 'com.android.application'
//apply from: "${rootDir}/../../platform/android/gradle/download-vulkan-validation.gradle"
android {
ndkVersion '27.0.12077973'
sourceSets {
test {
assets.srcDirs += ['../../../metrics']
}
}
defaultConfig {
applicationId = 'org.maplibre.render_test_runner'
compileSdk 34
minSdkVersion 21
targetSdkVersion 33
def abi = 'all'
if (project.hasProperty('maplibre.abis')) {
abi = project.getProperty('maplibre.abis')
}
ndk {
if (abi != 'all' && abi != 'none') {
abiFilters abi.split(' ')
} else {
abiFilters 'armeabi-v7a', 'x86', 'arm64-v8a', 'x86_64'
}
}
externalNativeBuild {
cmake {
arguments '-DANDROID_CCACHE=ccache'
arguments '-DANDROID_STL=c++_static'
arguments "-DMLN_LEGACY_RENDERER=OFF", "-DMLN_DRAWABLE_RENDERER=ON"
targets 'mbgl-render-test-runner'
}
}
android {
testBuildType 'release'
}
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
externalNativeBuild {
cmake {
version '3.19.0+'
path '../../../CMakeLists.txt'
}
}
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
flavorDimensions += "renderer"
productFlavors {
create("opengl") {
dimension = "renderer"
}
create("vulkan") {
dimension = "renderer"
externalNativeBuild {
cmake {
arguments "-DMLN_WITH_OPENGL=OFF", "-DMLN_WITH_VULKAN=ON"
}
}
}
}
namespace 'android.app'
}
dependencies {
implementation libs.supportConstraintLayout
androidTestImplementation libs.testRunner
androidTestImplementation libs.testEspressoCore
androidTestImplementation libs.testRules
}

View File

@@ -0,0 +1,85 @@
plugins {
id("com.android.application")
id("org.maplibre.ccache-plugin")
}
android {
ndkVersion = "27.0.12077973"
sourceSets {
getByName("test") {
assets.srcDirs("../../../metrics")
}
}
defaultConfig {
applicationId = "org.maplibre.render_test_runner"
compileSdk = 34
minSdk = 21
targetSdk = 33
val abi = if (project.hasProperty("maplibre.abis")) {
project.property("maplibre.abis") as String
} else {
"all"
}
ndk {
if (abi != "all" && abi != "none") {
abiFilters.addAll(abi.split(" "))
} else {
abiFilters.addAll(listOf("armeabi-v7a", "x86", "arm64-v8a", "x86_64"))
}
}
externalNativeBuild {
cmake {
arguments("-DANDROID_STL=c++_static")
arguments("-DMLN_LEGACY_RENDERER=OFF", "-DMLN_DRAWABLE_RENDERER=ON")
targets.add("mbgl-render-test-runner")
}
}
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
externalNativeBuild {
cmake {
version = "3.19.0+"
path = file("../../../CMakeLists.txt")
}
}
buildTypes {
getByName("release") {
signingConfig = signingConfigs.getByName("debug")
}
}
flavorDimensions += "renderer"
productFlavors {
create("opengl") {
dimension = "renderer"
}
create("vulkan") {
dimension = "renderer"
externalNativeBuild {
cmake {
arguments("-DMLN_WITH_OPENGL=OFF", "-DMLN_WITH_VULKAN=ON")
}
}
}
}
namespace = "android.app"
testBuildType = "release"
}
dependencies {
implementation(libs.supportConstraintLayout)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testEspressoCore)
androidTestImplementation(libs.testRules)
}

View File

@@ -1,16 +0,0 @@
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath libs.androidGradlePlugin
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}

View File

@@ -0,0 +1,3 @@
plugins {
id("com.android.application") version "8.6.0" apply false
}

View File

@@ -1,7 +0,0 @@
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
}
rootProject.name = "androidRenderTest"
include ":app"

View File

@@ -0,0 +1,25 @@
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}
rootProject.name = "androidRenderTest"
include(":app")
includeBuild(file("../../platform/android/MapLibrePlugin"))