diff --git a/include/mbgl/style/layers/custom_layer_host.hpp b/include/mbgl/style/layers/custom_layer_host.hpp index 6561be1aa..4abe092a3 100644 --- a/include/mbgl/style/layers/custom_layer_host.hpp +++ b/include/mbgl/style/layers/custom_layer_host.hpp @@ -1,10 +1,14 @@ #pragma once -#include #include #include namespace mbgl { + +namespace gfx { +class Context; +} // namespace gfx + namespace style { class CustomLayerHost { diff --git a/platform/android/MapLibreAndroid/build.gradle.kts b/platform/android/MapLibreAndroid/build.gradle.kts index 5a645ac39..eef6ee1d1 100644 --- a/platform/android/MapLibreAndroid/build.gradle.kts +++ b/platform/android/MapLibreAndroid/build.gradle.kts @@ -204,7 +204,7 @@ android { prefab { create("maplibre") { headers = "../prefab-headers" - libraryName = "libmaplibre" + headerOnly = true } } @@ -240,6 +240,16 @@ tasks.configureEach { } } +// AGP 9.1.1 still adds the native build output to the AAR even when the Prefab module is +// declared header-only. Keep the header-only metadata and omit that redundant unstripped copy. +tasks.withType().configureEach { + if (name.startsWith("bundle") && name.endsWith("Aar")) { + // The Prefab artifact is added under a `prefab/` destination by a nested copy spec, + // so its paths are still relative to the Prefab root when exclusions are evaluated. + exclude("modules/maplibre/libs/**") + } +} + configurations { getByName("implementation") { exclude(group = "commons-logging", module = "commons-logging")