From 2f13366905a6f0d0aae47750257a5fd197004c94 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Wed, 11 Dec 2024 17:49:21 +0100 Subject: [PATCH 1/6] Use MapLibre Android as attribution string across languages (#3080) Co-authored-by: Ian Wagner --- .../MapLibreAndroid/src/main/res/values-bg/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-ca/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-cs/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-es/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-fr/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-gl/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-he/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-hu/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-iw/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-ko/strings.xml | 8 ++++---- .../MapLibreAndroid/src/main/res/values-lt/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-nl/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-pl/strings.xml | 2 +- .../src/main/res/values-pt-rPT/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-ru/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-sv/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-uk/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values-vi/strings.xml | 2 +- .../src/main/res/values-zh-rCN/strings.xml | 2 +- .../src/main/res/values-zh-rHK/strings.xml | 2 +- .../src/main/res/values-zh-rTW/strings.xml | 2 +- .../MapLibreAndroid/src/main/res/values/strings.xml | 2 +- 22 files changed, 25 insertions(+), 25 deletions(-) diff --git a/platform/android/MapLibreAndroid/src/main/res/values-bg/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-bg/strings.xml index ab1818f4f06..dfdefd7dd23 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-bg/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-bg/strings.xml @@ -4,7 +4,7 @@ Иконка функции. Активирай, за да покажеш диалог функции. Изглед локация. Това показва местоположението ти на картата. Показва карта създадена с MapLibre. Скролни с два пръста. Мащабирай с два пръста. - MapLibre Android SDK + MapLibre Android Предоставените OfflineRegionDefinition не пасват в границите на света: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-ca/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-ca/strings.xml index e0e4e250a21..34f4c081a4d 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-ca/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-ca/strings.xml @@ -4,7 +4,7 @@ Icona d’atribució. Activa per mostrar el diàleg de l’atribució. Vista de posició. Mostra la teva posició al mapa. Mostrant un mapa creat amb MapLibre. Desplaça’t arrossegant amb dos dits. Fes zoom pessigant amb dos dits. - MapLibre Android SDK + MapLibre Android La OfflineRegionDefinition proporcionada no encaixa amb els límits del món: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-cs/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-cs/strings.xml index e9b2978f775..682fc8f8507 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-cs/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-cs/strings.xml @@ -4,7 +4,7 @@ Atributy. Zobrazit nastavení atributů. Zobrazení polohy. Zobrazit umístění na mapě. Zobrazení mapy vytvořené s MapLibre. Posunout tažením dvěma prsty. Změnit velikost roztažením dvou prstů. - MapLibre Maps SDK pro Android + MapLibre Android Na zařízení není nainstalován webový prohlížeč, webovou stránku nelze zobrazit. Pokud OfflineRegionDefinition neodpovídá hranicím: %s \ No newline at end of file diff --git a/platform/android/MapLibreAndroid/src/main/res/values-es/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-es/strings.xml index a5f148553a8..c5f211108a1 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-es/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-es/strings.xml @@ -4,7 +4,7 @@ Ícono de atribución. Actívalo para mostrar el diálogo de atribución. Vista de ubicación. Muestra tu ubicación en el mapa. Se está mostrando un mapa creado con MapLibre. Arrastra dos dedos para desplazarte o pellizca para acercar. - MapLibre Maps SDK para Android + MapLibre Android No puede abrir la página Web porque no hay un navegador Web en el dispositivo. El parámetro OfflineRegionDefinition que se ingresó no coincide con los límites mundiales: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-fr/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-fr/strings.xml index 18d0933a381..d36c445440f 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-fr/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-fr/strings.xml @@ -4,7 +4,7 @@ Icône d’attribution. Activer pour afficher le dialogue d’attribution. Vue de géolocalisation. Ceci affiche votre localisation sur la carte. Affichage d’une carte créée avec MapLibre. Faites la glisser en traînant deux doigts. Zoomez ou dézoomez en écartant ou rapprochant deux doigts. - SDK MapLibre Maps pour Android + MapLibre Android Aucun navigateur web installé sur l’appareil, impossible d’ouvrir une page web. Le cadre OfflineRegionDefinition pour définir la région de navigation ne tient pas dans les limites du monde : %s \ No newline at end of file diff --git a/platform/android/MapLibreAndroid/src/main/res/values-gl/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-gl/strings.xml index 94e9c0e22b9..5229b08e07b 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-gl/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-gl/strings.xml @@ -4,7 +4,7 @@ Icona de atribución. Actívaa para amosar o diálogo de atribución. Vista de ubicación. Amosa a túa ubicación no mapa. Estase a amosar un mapa feito co MapLibre. Belisca dous dedos para desprazarte ou belisca para achegar. - MapLibre Maps SDK para o Android + MapLibre Android Non podes abrir a páxina web porque non hai un navegador web no dispositivo. O parámetro OfflineRegionDefinition que se ingresou non coincide cos límites mundiais: %s \ No newline at end of file diff --git a/platform/android/MapLibreAndroid/src/main/res/values-he/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-he/strings.xml index 1a1017456e3..cbd763af03b 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-he/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-he/strings.xml @@ -4,7 +4,7 @@ סמל שיוך. הפעל כדי להציג תיבת דו-שיח של שיוך. סמן מיקום. מציג את המיקום הנוכחי שלך על המפה. מציג מפה שנוצרה עם MapLibre. גלול באמצעות גרירה עם שתי אצבעות, זום באמצעות צביטה עם שתי אצבעות. - MapLibre Maps SDK for Android + MapLibre Android לא מותקן דפדפן אינטרנט במכשיר, לא ניתן לפתוח את דף האינטרנט. בתנאי ש- OfflineRegionDefinition אינו מתאים לגבולות העולם: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-hu/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-hu/strings.xml index 6bfa6eb0de7..d7945d6d1bf 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-hu/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-hu/strings.xml @@ -2,7 +2,7 @@ Hely nézet. Megmutatja, hol vagy a térképen. Egy MapLibre-szal készült térkép megjelenítése. Húzd két ujjadat a görgetéshez. Csippentsd össze a nagyításhoz. - MapLibre Maps SDK Androidhoz + MapLibre Android Nincs webböngésző telepítve a készüléken, nem lehet megnyitni weboldalt. A megadott OfflineRegionDefinition nem fér bele a világ kereteibe: %s \ No newline at end of file diff --git a/platform/android/MapLibreAndroid/src/main/res/values-iw/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-iw/strings.xml index 1a1017456e3..cbd763af03b 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-iw/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-iw/strings.xml @@ -4,7 +4,7 @@ סמל שיוך. הפעל כדי להציג תיבת דו-שיח של שיוך. סמן מיקום. מציג את המיקום הנוכחי שלך על המפה. מציג מפה שנוצרה עם MapLibre. גלול באמצעות גרירה עם שתי אצבעות, זום באמצעות צביטה עם שתי אצבעות. - MapLibre Maps SDK for Android + MapLibre Android לא מותקן דפדפן אינטרנט במכשיר, לא ניתן לפתוח את דף האינטרנט. בתנאי ש- OfflineRegionDefinition אינו מתאים לגבולות העולם: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-ko/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-ko/strings.xml index 3e86536813a..59700a67136 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-ko/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-ko/strings.xml @@ -1,10 +1,10 @@ - 지도 나침반. 지도회전를 북쪽으로 재설정합니다. + 지도 나침반. 지도회전을 북쪽으로 재설정합니다. 속성 정보. 속성 대화를 표시합니다. 로케이션 뷰. 지도에서 현재 위치를 보여줍니다. - 맵박스로 생성된 지도 표시. 두 손가락으로 드래그하여 화면을 위 아래로 움직이세요. 두 손가락을 이용해 화면을 확대 축소 하세요. - 안드로이드를 위한 맵박스 맵 SDK - 웹 브라우저가 설치 되어 있지 않아, 웹 페이지를 열 수 없습니다. + MapLibre로 생성된 지도 표시. 두 손가락으로 드래그하여 화면을 위 아래로 움직이세요. 두 손가락을 이용해 화면을 확대 축소 하세요. + MapLibre Android + 웹 브라우저가 설치 되어 있지 않아서 웹 페이지를 열 수 없습니다. 제공된 오프라인지역정의가 월드바운즈에 적합하지 않습니다: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-lt/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-lt/strings.xml index 042fa1e4794..e9ebad99641 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-lt/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-lt/strings.xml @@ -4,7 +4,7 @@ Įnašo ikona. Paspausk norėdamas pamatyti dialogą su detalėmis Vartotojo vietos vaizdas. Nurodo tavo poziciją žemėlapyje Rodomas MapLibre kurtas žemėlapis. Naviguok tempdamas du pirštus. Valdyk žemėlapio pritraukimą suimdamas/atitolindamas du pirštus. - MapLibre Android SDK + MapLibre Android Pasirinktas OfflineRegionDefinition netalpa į rėžius: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-nl/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-nl/strings.xml index 4bda0d7fc4c..8f38c2ffe40 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-nl/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-nl/strings.xml @@ -4,7 +4,7 @@ Attributie icoon. Activeer voor het tonen van het attributie dialoog. Locatie Element. Dit toont jouw locatie op de map. Toont een map gemaakt met MapLibre. Scroll door het slepen met twee vingers. Zoom door vingers te nijpen. - MapLibre Android SDK + MapLibre Android Aangeleverde OfflineRegionDefinition past niet in de wereld omtrek: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-pl/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-pl/strings.xml index 8596defccbf..1c6e426f8a4 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-pl/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-pl/strings.xml @@ -4,7 +4,7 @@ Atrybucja. Aktywuj, żeby pokazać więcej informacji. Widok lokalizacji. Pokazuje twoją pozycję na mapie. Pokazuje mapę stworzoną za pomocą biblioteki MapLibre. Przesuń mapę za pomocą przeciągnięcia dwoma palcami. Przybliż za pomocą uszczypnięcia dwoma palcami. - MapLibre Maps SDK dla Androida + MapLibre Android Nie potrafię otworzyć strony, brak przeglądarki internetowej zainstalowanej na urządzeniu. Wymagany region nie mieści się w granicach świata: %s \ No newline at end of file diff --git a/platform/android/MapLibreAndroid/src/main/res/values-pt-rPT/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-pt-rPT/strings.xml index 1e4a9144524..294b562f1da 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-pt-rPT/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-pt-rPT/strings.xml @@ -4,7 +4,7 @@ Ícone de atribuição. Ativar para mostrar a janela de atribuição. Vista de localização. Isto mostra a sua localização no mapa. A mostrar um Mapa criado com MapLibre. Desloque arrastanto com 2 dedos. Zoom afastando ou aproximando os 2 dedos. - Mapas MapLibre SDK para Android + MapLibre Android Não está nenhum navegador de Internet instalado no dispositivo. Não é possível abrir a página web. O OfflineRegionDefinition não cabe nos limites do mundo: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-ru/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-ru/strings.xml index d60dbb14ee7..38fa2e908d5 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-ru/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-ru/strings.xml @@ -4,7 +4,7 @@ Значок атрибутов. Активируйте, чтобы показать диалог. Местоположение. Отображает вашу позицию на карте. Отображает карту, созданную при помощи MapLibre. Пролистывайте двумя пальцами. Меняйте масштаб сведением пальцев. - MapLibre Maps SDK для Android + MapLibre Android На устройстве нет веб-браузера, нельзя показать веб-страницу. Запрошенный OfflineRegionDefinition не входит в допустимые границы: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-sv/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-sv/strings.xml index 7f25c919b90..85d008f147c 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-sv/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-sv/strings.xml @@ -4,7 +4,7 @@ Tillskrivningsikon. Aktivera för att visa tillskrivningsdialog. Positionsvy. Denna visar din position på kartan. Visar en karta skapad med MapLibre. Scrolla genom att dra med två fingrar. Zooma genom att nypa med två fingrar. - MapLibre Maps SDK for Android + MapLibre Android Ingen webbläsare installerad på enheten. Kan inte visa sidan. Försedd OfflineRegionDefinition passar inte världens gränser: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-uk/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-uk/strings.xml index e49faa84487..c2e52eee257 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-uk/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-uk/strings.xml @@ -4,7 +4,7 @@ Значок атрибуції. Натисніть, щоб показати діалог атрибуції. Визначення положення. Показує ваше місцеположення на мапі. Показує мапи створені за допомоги MapLibre. Пересувайте мапу двома пальцями. Змінюйте масштаб стуляючи/розводячи два пальці. - MapLibre Maps SDK для Android + MapLibre Android Веб-оглядач відсутній на цьому пристрої, неможливо відкрити веб-сторінку Межі ділянки для оффлайнового користування даними за межами світу: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-vi/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-vi/strings.xml index 17c29537c7b..90d76c58a4d 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-vi/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-vi/strings.xml @@ -4,7 +4,7 @@ Biểu tượng ghi công. Kích hoạt để xem hộp thoại ghi công. Cái chỉ vị trí. Cái này chỉ vị trí của bạn trên bản đồ. Đang xem bản đồ được xây dựng dùng MapLibre. Kéo hai ngón tay để cuộn. Chụm các ngón tay lại để phóng to. Tách các ngón tay ra để thu nhỏ. - MapLibre Maps SDK cho Android + MapLibre Android Không thể mở trang Web vì thiết bị thiếu trình duyệt. OfflineRegionDefinition được cung cấp không vừa thế giới: %s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-zh-rCN/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-zh-rCN/strings.xml index 5a5a53ca3b1..f07ab5c3098 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-zh-rCN/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-zh-rCN/strings.xml @@ -4,7 +4,7 @@ Attribution图标,点击以显示attribution对话框。 定位视图,在地图上显示当前位置。 显示由MapLibre创建的地图,通过拖动两个手指来滚动,捏两个手指来放大。 - MapLibre Maps SDK for Android + MapLibre Android 设备中未安装任何浏览器,不能打开该网页 提供的OfflineRegionDefinition不符合标准地理范围:%s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-zh-rHK/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-zh-rHK/strings.xml index d3b9659f7d0..0c4ba3041cc 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-zh-rHK/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-zh-rHK/strings.xml @@ -4,7 +4,7 @@ Attribution圖標,點擊以顯示attribution對話框。 定位視圖,在地圖上顯示當前位置。 顯示由MapLibre創建的地圖,通過拖動兩個手指來滾動,捏兩個手指來放大。 - MapLibre Maps SDK for Android + MapLibre Android 設備中未安裝任何瀏覽器,不能打開該網頁 提供的OfflineRegionDefinition不符合標準地理範圍:%s diff --git a/platform/android/MapLibreAndroid/src/main/res/values-zh-rTW/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values-zh-rTW/strings.xml index d3b9659f7d0..0c4ba3041cc 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values-zh-rTW/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values-zh-rTW/strings.xml @@ -4,7 +4,7 @@ Attribution圖標,點擊以顯示attribution對話框。 定位視圖,在地圖上顯示當前位置。 顯示由MapLibre創建的地圖,通過拖動兩個手指來滾動,捏兩個手指來放大。 - MapLibre Maps SDK for Android + MapLibre Android 設備中未安裝任何瀏覽器,不能打開該網頁 提供的OfflineRegionDefinition不符合標準地理範圍:%s diff --git a/platform/android/MapLibreAndroid/src/main/res/values/strings.xml b/platform/android/MapLibreAndroid/src/main/res/values/strings.xml index c46c01795a2..e8154eb6859 100644 --- a/platform/android/MapLibreAndroid/src/main/res/values/strings.xml +++ b/platform/android/MapLibreAndroid/src/main/res/values/strings.xml @@ -4,7 +4,7 @@ Attribution icon. Activate to show attribution dialog. Location View. This shows your location on the map. Showing a Map created with MapLibre. Scroll by dragging two fingers. Zoom by pinching two fingers. - MapLibre Maps SDK for Android + MapLibre Android No web browser installed on device, can\'t open web page. Provided OfflineRegionDefinition doesn\'t fit the world bounds: %s From 780b736aeff94ca70209d9e5598f9adc822063b2 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Wed, 11 Dec 2024 20:09:04 +0100 Subject: [PATCH 2/6] Prepare Android release workflow for Vulkan release (#3081) --- .github/workflows/android-release.yml | 56 +++++++++---------- platform/android/Makefile | 6 +- .../maplibre.artifact-settings.gradle.kts | 4 +- .../kotlin/maplibre.gradle-publish.gradle.kts | 42 ++++++++++---- 4 files changed, 66 insertions(+), 42 deletions(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 6fa39007aa2..8bcab6cd79e 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -2,15 +2,6 @@ name: android-release on: workflow_dispatch: - inputs: - renderer: - description: "Select renderering backend" - required: true - default: "OpenGL" - type: choice - options: - - OpenGL - - Vulkan jobs: build: @@ -28,15 +19,6 @@ jobs: submodules: recursive fetch-depth: 0 - - name: Map renderer input - id: backend_lowercase - run: | - if [ "${{ github.event.inputs.renderer }}" = "OpenGL" ]; then - echo "backend_lowercase=drawable" >> "$GITHUB_ENV" - elif [ "${{ github.event.inputs.renderer }}" = "Vulkan" ]; then - echo "backend_lowercase=vulkan" >> "$GITHUB_ENV" - fi - - run: echo "cmake.dir=$(dirname "$(dirname "$(command -v cmake)")")" >> local.properties - uses: actions/setup-java@v4 @@ -74,9 +56,9 @@ jobs: shell: bash - name: Build package - run: make apackage - env: - RENDERER: ${{ env.backend_lowercase }} + run: | + RENDERER=vulkan make apackage + RENDERER=opengl make apackage - name: Build release Test App run: | @@ -123,25 +105,44 @@ jobs: draft: false prerelease: ${{ env.prerelease }} - - name: Upload aar - id: upload-release-asset + - name: Upload aar (OpenGL) uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: platform/android/MapLibreAndroid/build/outputs/aar/MapLibreAndroid-${{ env.backend_lowercase }}-release.aar + asset_path: platform/android/MapLibreAndroid/build/outputs/aar/MapLibreAndroid-drawable-release.aar asset_name: MapLibreAndroid-release.aar asset_content_type: application/zip - - name: Upload debug symbols + - name: Upload aar (Vulkan) + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: platform/android/MapLibreAndroid/build/outputs/aar/MapLibreAndroid-vulkan-release.aar + asset_name: MapLibreAndroid-release-vulkan.aar + asset_content_type: application/zip + + - name: Upload debug symbols (OpenGL) + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: platform/android/build/debug-symbols-opengl.tar.gz + asset_name: debug-symbols-maplibre-android-opengl-${{ steps.prepare_release.outputs.version_tag }}.tar.gz + asset_content_type: application/gzip + + - name: Upload debug symbols (Vulkan) uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: platform/android/build/debug-symbols.tar.gz - asset_name: debug-symbols.tar.gz + asset_path: platform/android/build/debug-symbols-vulkan.tar.gz + asset_name: debug-symbols-maplibre-android-vulkan-${{ steps.prepare_release.outputs.version_tag }}.tar.gz asset_content_type: application/gzip - name: Clean release @@ -164,4 +165,3 @@ jobs: SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} - RENDERER: ${{ env.backend_lowercase }} diff --git a/platform/android/Makefile b/platform/android/Makefile index c1621751f82..8b1a85738e8 100644 --- a/platform/android/Makefile +++ b/platform/android/Makefile @@ -223,6 +223,8 @@ run-android-unit-test: run-android-unit-test-%: $(MLN_ANDROID_GRADLE) -Pmaplibre.abis=none :MapLibreAndroid:testLegacyDebugUnitTest --info --tests "$*" +DEBUG_TAR_FILE_NAME := $(if $(findstring drawable,$(RENDERER)),debug-symbols-opengl.tar.gz,debug-symbols-$(RENDERER).tar.gz) + # Builds a release package and .tar.gz with debug symbols of the Android SDK .PHONY: apackage apackage: @@ -230,7 +232,7 @@ apackage: make android-lib-arm-v7 && make android-lib-arm-v8 && make android-lib-x86 && make android-lib-x86-64 $(MLN_ANDROID_GRADLE) -Pmaplibre.abis=all assemble$(RENDERER)$(BUILDTYPE) mkdir -p build - tar -czvf build/debug-symbols.tar.gz -C MapLibreAndroid/build/intermediates/library_jni/*/*JniLibsProjectOnly/jni . + tar -czvf build/$(DEBUG_TAR_FILE_NAME) -C MapLibreAndroid/build/intermediates/library_jni/$(RENDERER)Release/*JniLibsProjectOnly/jni . # Build test app instrumentation tests apk and test app apk for all abi's .PHONY: android-ui-test @@ -245,7 +247,7 @@ run-android-test-app-center: # Uploads the compiled Android SDK to Maven Central Staging .PHONY: run-android-publish run-android-publish: - $(MLN_ANDROID_GRADLE_SINGLE_JOB)-Pmaplibre.abis=all :MapLibreAndroid:publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository + $(MLN_ANDROID_GRADLE_SINGLE_JOB)-Pmaplibre.abis=all :MapLibreAndroid:publishAllPublicationsToSonatypeRepository closeAndReleaseSonatypeStagingRepository # Dump system graphics information for the test app .PHONY: android-gfxinfo diff --git a/platform/android/buildSrc/src/main/kotlin/maplibre.artifact-settings.gradle.kts b/platform/android/buildSrc/src/main/kotlin/maplibre.artifact-settings.gradle.kts index 91784526335..20ef7345923 100644 --- a/platform/android/buildSrc/src/main/kotlin/maplibre.artifact-settings.gradle.kts +++ b/platform/android/buildSrc/src/main/kotlin/maplibre.artifact-settings.gradle.kts @@ -1,7 +1,7 @@ extra["mapLibreArtifactGroupId"] = "org.maplibre.gl" extra["mapLibreArtifactId"] = "android-sdk" -extra["mapLibreArtifactTitle"] = "MapLibre Maps SDK for Android" -extra["mapLibreArtifactDescription"] = "MapLibre Maps SDK for Android" +extra["mapLibreArtifactTitle"] = "MapLibre Android" +extra["mapLibreArtifactDescription"] = "MapLibre Android" extra["mapLibreDeveloperName"] = "MapLibre" extra["mapLibreDeveloperId"] = "maplibre" extra["mapLibreArtifactUrl"] = "https://github.com/maplibre/maplibre-native" diff --git a/platform/android/buildSrc/src/main/kotlin/maplibre.gradle-publish.gradle.kts b/platform/android/buildSrc/src/main/kotlin/maplibre.gradle-publish.gradle.kts index aff14ef5983..3058a4232f3 100644 --- a/platform/android/buildSrc/src/main/kotlin/maplibre.gradle-publish.gradle.kts +++ b/platform/android/buildSrc/src/main/kotlin/maplibre.gradle-publish.gradle.kts @@ -1,4 +1,5 @@ import org.gradle.kotlin.dsl.get +import java.util.Locale plugins { `maven-publish` @@ -43,20 +44,24 @@ project.logger.lifecycle(project.extra["versionName"].toString()) version = project.extra["versionName"] as String group = project.extra["mapLibreArtifactGroupId"] as String -afterEvaluate { +fun configureMavenPublication( + renderer: String, + publicationName: String, + artifactIdPostfix: String, + descriptionPostfix: String, +) { publishing { publications { - create("release") { - groupId = this@afterEvaluate.group.toString() - artifactId = project.extra["mapLibreArtifactId"].toString() - version = this@afterEvaluate.version.toString() + create(publicationName) { + groupId = project.group.toString() + artifactId = "${project.extra["mapLibreArtifactId"]}$artifactIdPostfix" + version = project.version.toString() - // Conditional component selection based on environment variable - from(components[if (System.getenv("RENDERER")?.lowercase() == "vulkan") "vulkanRelease" else "drawableRelease"]) + from(components["${renderer}Release"]) pom { - name.set(project.extra["mapLibreArtifactTitle"].toString()) - description.set(project.extra["mapLibreArtifactTitle"].toString()) + name.set("${project.extra["mapLibreArtifactTitle"]}$descriptionPostfix") + description.set("${project.extra["mapLibreArtifactTitle"]}$descriptionPostfix") url.set(project.extra["mapLibreArtifactUrl"].toString()) licenses { license { @@ -68,7 +73,7 @@ afterEvaluate { developer { id.set(project.extra["mapLibreDeveloperId"].toString()) name.set(project.extra["mapLibreDeveloperName"].toString()) - email.set("maplibre@maplibre.org") + email.set("team@maplibre.org") } } scm { @@ -80,7 +85,24 @@ afterEvaluate { } } } +} + +// workaround for https://github.com/gradle/gradle/issues/26091#issuecomment-1836156762 +// https://github.com/gradle-nexus/publish-plugin/issues/208 +tasks { + withType { + dependsOn(withType()) + } +} + +afterEvaluate { + configureMavenPublication("drawable", "opengl", "", "") + configureMavenPublication("vulkan", "vulkan", "-vulkan", "(Vulkan)") + // Right now this is the same as the first, but in the future we might release a major version + // which defaults to Vulkan (or has support for multiple backends). We will keep using only + // OpenGL ES with this artifact ID if that happens. + configureMavenPublication("drawable", "opengl2", "-opengl", " (OpenGL ES)") } From 66e0037cf88388d2ad66764d80edc1a9be13d771 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Wed, 11 Dec 2024 22:51:40 +0100 Subject: [PATCH 3/6] Prepare for official MapLibre Android + Vulkan release (#3086) --- platform/android/CHANGELOG.md | 21 ++++++++++++++++++- .../android/MapLibreAndroid/gradle.properties | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/platform/android/CHANGELOG.md b/platform/android/CHANGELOG.md index 0c26f69f5cf..2884391bf55 100644 --- a/platform/android/CHANGELOG.md +++ b/platform/android/CHANGELOG.md @@ -1,11 +1,30 @@ # Changelog MapLibre Native for Android -## main +## 11.7.0 + +This release marks the official release of MapLibre Android with Vulkan support. [Vulkan](https://www.vulkan.org) is a modern graphics API which brings advantages such as improved performance, improved observability and better stability. Specifically, starting with this version we are releasing multiple versions of MapLibre Android: + +- `org.maplibre.gl:android-sdk` (still OpenGL ES for now, might default to another rendering backend or might choose depending on device support in a future major release). +- `org.maplibre.gl:android-sdk-opengl` (OpenGL ES). +- `org.maplibre.gl:android-sdk-vulkan` (Vulkan). + +Stability has proven to be excellent, but there are a few [known issues with Vulkan](https://github.com/maplibre/maplibre-native/issues?q=is%3Aissue%20state%3Aopen%20label%3AVulkan%20type%3ABug) that will be addressed in a future update. + +Currently it is not possible to choose a backend at runtime. If you care about supporting devices that only support OpenGL ES and you want to use Vulkan, you will need to produce and ship [multiple APKs](https://developer.android.com/google/play/publishing/multiple-apks). Please see [this issue](https://github.com/maplibre/maplibre-native/issues/3079) if you are interested in choosing a rendering backend during initialization. + +Thanks to everyone who helped test the pre-releases! ### ✨ Features and improvements +- Fix the issue that the empty polyline cannot be updated ([#3046](https://github.com/maplibre/maplibre-native/pull/3046)). +- feat: add `getZoom` and `setZoom` function support for Android Auto ([#3037](https://github.com/maplibre/maplibre-native/pull/3037)). +- Use MapLibre Android as attribution string across languages ([#3080](https://github.com/maplibre/maplibre-native/pull/3080)). +- Use CMake 3.24.0+ for Android ([#3065](https://github.com/maplibre/maplibre-native/pull/3065)). + ### 🐞 Bug fixes +- Fix crash on unsupported attribute type conversion ([#3066](https://github.com/maplibre/maplibre-native/pull/3066)). + ## 11.6.1 ### 🐞 Bug fixes diff --git a/platform/android/MapLibreAndroid/gradle.properties b/platform/android/MapLibreAndroid/gradle.properties index d993d913a91..081f5a9742c 100644 --- a/platform/android/MapLibreAndroid/gradle.properties +++ b/platform/android/MapLibreAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=11.6.1 +VERSION_NAME=11.7.0 # Only build native dependencies for the current ABI # See https://code.google.com/p/android/issues/detail?id=221098#c20 From 72d2c70130fcd4e320cf623f9bec811108b6e201 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Thu, 12 Dec 2024 00:30:55 +0100 Subject: [PATCH 4/6] Fix issue in android-release.yml (#3087) --- .github/workflows/android-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 8bcab6cd79e..02fb0f71c7b 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -58,7 +58,7 @@ jobs: - name: Build package run: | RENDERER=vulkan make apackage - RENDERER=opengl make apackage + RENDERER=drawable make apackage - name: Build release Test App run: | From 12f596ce7dfeabd22e9360707fbf95928e8bedaa Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 13 Dec 2024 10:21:48 -0800 Subject: [PATCH 5/6] Batch up scheduling of deferred deletions (#3030) --- src/mbgl/renderer/tile_pyramid.cpp | 3 ++ src/mbgl/tile/tile_cache.cpp | 56 ++++++++++++++++++++++++------ src/mbgl/tile/tile_cache.hpp | 16 ++++----- src/mbgl/vulkan/context.cpp | 2 +- src/mbgl/vulkan/descriptor_set.cpp | 12 ++++--- 5 files changed, 62 insertions(+), 27 deletions(-) diff --git a/src/mbgl/renderer/tile_pyramid.cpp b/src/mbgl/renderer/tile_pyramid.cpp index 4533e6f7549..3e79657b5bf 100644 --- a/src/mbgl/renderer/tile_pyramid.cpp +++ b/src/mbgl/renderer/tile_pyramid.cpp @@ -82,6 +82,7 @@ void TilePyramid::update(const std::vector>& l tiles.clear(); renderedTiles.clear(); + cache.deferPendingReleases(); return; } @@ -279,6 +280,8 @@ void TilePyramid::update(const std::vector>& l tile.usedByRenderedLayers |= tile.layerPropertiesUpdated(layerProperties); } } + + cache.deferPendingReleases(); } void TilePyramid::handleWrapJump(float lng) { diff --git a/src/mbgl/tile/tile_cache.cpp b/src/mbgl/tile/tile_cache.cpp index 2bbde03a82b..5104c3ea6ef 100644 --- a/src/mbgl/tile/tile_cache.cpp +++ b/src/mbgl/tile/tile_cache.cpp @@ -1,10 +1,22 @@ #include + #include #include + #include namespace mbgl { +TileCache::~TileCache() { + MLN_TRACE_FUNC(); + + clear(); + pendingReleases.clear(); + + std::unique_lock counterLock{deferredSignalLock}; + deferredSignal.wait(counterLock, [&]() { return deferredDeletionsPending == 0; }); +} + void TileCache::setSize(size_t size_) { MLN_TRACE_FUNC(); @@ -26,16 +38,20 @@ void TileCache::setSize(size_t size_) { } namespace { - /// This exists solely to prevent a problem where temporary lambda captures /// are retained for the duration of the scope instead of being destroyed immediately. -template struct CaptureWrapper { - CaptureWrapper(std::unique_ptr&& item_) - : item(std::move(item_)) {} + CaptureWrapper(std::vector>&& items_) + : items(items_.size()) { + std::ranges::move(items_, items.begin()); + } + CaptureWrapper(CaptureWrapper&&) = default; + + /// This copy constructor is required to build, but doesn't seem to be called. CaptureWrapper(const CaptureWrapper& other) - : item(other.item) {} - std::shared_ptr item; + : items(other.items) {} + + std::vector> items; }; } // namespace @@ -43,6 +59,25 @@ void TileCache::deferredRelease(std::unique_ptr&& tile) { MLN_TRACE_FUNC(); tile->cancel(); + pendingReleases.push_back(std::move(tile)); +} + +void TileCache::deferPendingReleases() { + MLN_TRACE_FUNC(); + + constexpr std::size_t scheduleThreshold = 1; + if (pendingReleases.size() < scheduleThreshold) { + return; + } + + // Block destruction until the cleanup task is complete + { + std::lock_guard counterLock{deferredSignalLock}; + deferredDeletionsPending++; + } + + CaptureWrapper wrap{std::move(pendingReleases)}; + pendingReleases.clear(); // The `std::function` must be created in a separate statement from the `schedule` call. // Creating a `std::function` from a lambda involves a copy, which is why we must use @@ -51,17 +86,16 @@ void TileCache::deferredRelease(std::unique_ptr&& tile) { // If this temporary outlives the `schedule` call, and the function is executed immediately // by a waiting thread and is already complete, that temporary reference ends up being the // last one and the destruction actually occurs here on this thread. - std::function func{[tile_{CaptureWrapper{std::move(tile)}}, this]() mutable { - tile_.item = {}; + std::function func{[tile_{CaptureWrapper{std::move(wrap)}}, this]() mutable { + MLN_TRACE_ZONE(deferPendingReleases lambda); + MLN_ZONE_VALUE(wrap_.releases.size()); + tile_.items.clear(); std::lock_guard counterLock(deferredSignalLock); deferredDeletionsPending--; deferredSignal.notify_all(); }}; - std::unique_lock counterLock(deferredSignalLock); - deferredDeletionsPending++; - threadPool.schedule(std::move(func)); } diff --git a/src/mbgl/tile/tile_cache.hpp b/src/mbgl/tile/tile_cache.hpp index db9f8658c46..fea185a32ba 100644 --- a/src/mbgl/tile/tile_cache.hpp +++ b/src/mbgl/tile/tile_cache.hpp @@ -18,15 +18,7 @@ class TileCache { TileCache(const TaggedScheduler& threadPool_, size_t size_ = 0) : threadPool(threadPool_), size(size_) {} - - ~TileCache() { - clear(); - - std::unique_lock counterLock(deferredSignalLock); - while (deferredDeletionsPending != 0) { - deferredSignal.wait(counterLock); - } - } + ~TileCache(); /// Change the maximum size of the cache. void setSize(size_t); @@ -43,13 +35,17 @@ class TileCache { bool has(const OverscaledTileID& key); void clear(); - /// Destroy a tile without blocking + /// Set aside a tile to be destroyed later, without blocking void deferredRelease(std::unique_ptr&&); + /// Schedule any accumulated deferred tiles to be destroyed + void deferPendingReleases(); + private: std::map> tiles; std::list orderedKeys; TaggedScheduler threadPool; + std::vector> pendingReleases; size_t deferredDeletionsPending{0}; std::mutex deferredSignalLock; std::condition_variable deferredSignal; diff --git a/src/mbgl/vulkan/context.cpp b/src/mbgl/vulkan/context.cpp index 9f54ebed28b..e3055c4054f 100644 --- a/src/mbgl/vulkan/context.cpp +++ b/src/mbgl/vulkan/context.cpp @@ -596,7 +596,7 @@ void Context::buildUniformDescriptorSetLayout(vk::UniqueDescriptorSetLayout& lay for (size_t i = 0; i < uniformCount; ++i) { bindings.push_back(vk::DescriptorSetLayoutBinding() - .setBinding(i) + .setBinding(static_cast(i)) .setStageFlags(stageFlags) .setDescriptorType(vk::DescriptorType::eUniformBuffer) .setDescriptorCount(1)); diff --git a/src/mbgl/vulkan/descriptor_set.cpp b/src/mbgl/vulkan/descriptor_set.cpp index d8d6866e5e7..f27f0a23c3e 100644 --- a/src/mbgl/vulkan/descriptor_set.cpp +++ b/src/mbgl/vulkan/descriptor_set.cpp @@ -50,7 +50,7 @@ void DescriptorSet::createDescriptorPool(DescriptorPoolGrowable& growablePool) { const auto descriptorPoolInfo = vk::DescriptorPoolCreateInfo(poolFlags).setPoolSizes(size).setMaxSets(maxSets); growablePool.pools.emplace_back(device->createDescriptorPoolUnique(descriptorPoolInfo), maxSets); - growablePool.currentPoolIndex = growablePool.pools.size() - 1; + growablePool.currentPoolIndex = static_cast(growablePool.pools.size() - 1); }; void DescriptorSet::allocate() { @@ -73,7 +73,8 @@ void DescriptorSet::allocate() { growablePool.pools.begin(), growablePool.pools.end(), [&](const auto& p) { return !p.unusedSets.empty(); }); if (unusedPoolIt != growablePool.pools.end()) { - growablePool.currentPoolIndex = std::distance(growablePool.pools.begin(), unusedPoolIt); + growablePool.currentPoolIndex = static_cast( + std::distance(growablePool.pools.begin(), unusedPoolIt)); } else #endif { @@ -83,7 +84,8 @@ void DescriptorSet::allocate() { [&](const auto& p) { return p.remainingSets >= layouts.size(); }); if (freePoolIt != growablePool.pools.end()) { - growablePool.currentPoolIndex = std::distance(growablePool.pools.begin(), freePoolIt); + growablePool.currentPoolIndex = static_cast( + std::distance(growablePool.pools.begin(), freePoolIt)); } else { createDescriptorPool(growablePool); } @@ -161,7 +163,7 @@ void UniformDescriptorSet::update(const gfx::UniformBufferArray& uniforms, .setBufferInfo(descriptorBufferInfo) .setDescriptorCount(1) .setDescriptorType(vk::DescriptorType::eUniformBuffer) - .setDstBinding(index) + .setDstBinding(static_cast(index)) .setDstSet(descriptorSets[frameIndex]); device->updateDescriptorSets(writeDescriptorSet, nullptr); @@ -197,7 +199,7 @@ void ImageDescriptorSet::update(const std::array(id)) .setDstSet(descriptorSets[frameIndex]); device->updateDescriptorSets(writeDescriptorSet, nullptr); From b44b644e4ad219fbe797f1b6218283de84fccd63 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 13 Dec 2024 12:06:46 -0800 Subject: [PATCH 6/6] Remove `Pass3D` (#3077) --- .../layers/render_fill_extrusion_layer.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/mbgl/renderer/layers/render_fill_extrusion_layer.cpp b/src/mbgl/renderer/layers/render_fill_extrusion_layer.cpp index bda207767e4..98f5f226743 100644 --- a/src/mbgl/renderer/layers/render_fill_extrusion_layer.cpp +++ b/src/mbgl/renderer/layers/render_fill_extrusion_layer.cpp @@ -63,9 +63,8 @@ void RenderFillExtrusionLayer::evaluate(const PropertyEvaluationParameters& para parameters.getCrossfadeParameters(), unevaluated.evaluate(parameters, previousProperties->evaluated)); - passes = (properties->evaluated.get() > 0) - ? (RenderPass::Translucent | RenderPass::Pass3D) - : RenderPass::None; + passes = (properties->evaluated.get() > 0) ? RenderPass::Translucent + : RenderPass::None; properties->renderPasses = mbgl::underlying_type(passes); evaluatedProperties = std::move(properties); @@ -304,15 +303,12 @@ void RenderFillExtrusionLayer::update(gfx::ShaderRegistry& shaders, const auto& evaluated = static_cast(*evaluatedProperties).evaluated; - // `passes` is set to (RenderPass::Translucent | RenderPass::Pass3D), but `render()` - // only runs on the translucent pass, so although our output is 3D, it does not render - // in the "3D pass". constexpr auto drawPass = RenderPass::Translucent; stats.drawablesRemoved += tileLayerGroup->removeDrawablesIf([&](gfx::Drawable& drawable) { // If the render pass has changed or the tile has dropped out of the cover set, remove it. const auto& tileID = drawable.getTileID(); - if (!(drawable.getRenderPass() & passes) || (tileID && !hasRenderTile(*tileID))) { + if (!(drawable.getRenderPass() & drawPass) || (tileID && !hasRenderTile(*tileID))) { return true; } return false; @@ -337,7 +333,7 @@ void RenderFillExtrusionLayer::update(gfx::ShaderRegistry& shaders, for (const RenderTile& tile : *renderTiles) { const auto& tileID = tile.getOverscaledTileID(); - const auto* optRenderData = getRenderDataForPass(tile, passes); + const auto* optRenderData = getRenderDataForPass(tile, drawPass); if (!optRenderData || !optRenderData->bucket || !optRenderData->bucket->hasData()) { removeTile(drawPass, tileID); continue; @@ -349,7 +345,7 @@ void RenderFillExtrusionLayer::update(gfx::ShaderRegistry& shaders, const auto prevBucketID = getRenderTileBucketID(tileID); if (prevBucketID != util::SimpleIdentity::Empty && prevBucketID != bucket.getID()) { // This tile was previously set up from a different bucket, drop and re-create any drawables for it. - removeTile(passes, tileID); + removeTile(drawPass, tileID); } setRenderTileBucketID(tileID, bucket.getID());