feat(android): Vulkan graphics backend support for Android custom layers (#4348)

Co-authored-by: Vladyslav Odobesku <VladyslavOdobesku@intellias.com>
Co-authored-by: Claude Opus 4 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Vladyslav Odobesku
2026-06-26 19:53:00 +03:00
committed by GitHub
parent 9f6f8e3f1b
commit aa90185d42
25 changed files with 791 additions and 67 deletions

View File

@@ -177,6 +177,14 @@ android {
buildFeatures {
buildConfig = true
prefabPublishing = project.findProperty("maplibre.abis") != "none"
}
prefab {
create("maplibre") {
headers = "../prefab-headers"
libraryName = "libmaplibre"
}
}
compileOptions {
@@ -192,6 +200,25 @@ fun getGitRevision(shortRev: Boolean = true): String {
return proc.inputStream.bufferedReader().readText().trim()
}
val syncPrefabHeaders by tasks.registering(Sync::class) {
val nativeRoot = rootProject.rootDir.resolve("../..")
from(nativeRoot.resolve("include")) {
include("mbgl/style/layers/custom_layer_host.hpp")
include("mbgl/style/layers/custom_layer_init_parameters.hpp")
include("mbgl/style/layers/custom_layer_render_parameters.hpp")
include("mbgl/style/layers/vulkan/custom_layer_init_parameters.hpp")
include("mbgl/style/layers/vulkan/custom_layer_render_parameters.hpp")
}
into(project.rootDir.resolve("prefab-headers"))
}
tasks.configureEach {
if (name == "syncPrefabHeaders") return@configureEach
if (name.contains("Prefab", ignoreCase = true) || name.contains("bundleLibRuntimeTo", ignoreCase = true)) {
dependsOn(syncPrefabHeaders)
}
}
configurations {
getByName("implementation") {
exclude(group = "commons-logging", module = "commons-logging")