From 84bcf8cb5b74e7ccb30f0af5898f55b6957756d9 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Tue, 27 Aug 2024 17:35:19 +0200 Subject: [PATCH] Prepare for MapLibre Native Android 11.2.0 release (#2772) --- platform/android/CHANGELOG.md | 26 +++++++++++++ .../android/MapLibreAndroid/gradle.properties | 2 +- scripts/generate-changelog.mjs | 38 ++++++++++--------- 3 files changed, 48 insertions(+), 18 deletions(-) diff --git a/platform/android/CHANGELOG.md b/platform/android/CHANGELOG.md index dd85d4f71..d7bb0755e 100644 --- a/platform/android/CHANGELOG.md +++ b/platform/android/CHANGELOG.md @@ -6,6 +6,32 @@ ### 🐞 Bug fixes +## 11.2.0 + +### ✨ Features and improvements + +- Toggle tile cache final API ([#2723](https://github.com/maplibre/maplibre-native/pull/2723)). + This is a new API on `MapLibreMap`: `setTileCacheEnabled()` and `getTileCacheEnabled()`. This tile cache is used to cache tiles on different zoom levels, disabling it will reduce memory usage. +- Add `getOfflineRegion` Kotlin API ([#2516](https://github.com/maplibre/maplibre-native/pull/2516)). This is the first (code) contribution from [@JRWilding](https://github.com/JRWilding)! 🎉 +- Bump NDK version to 27.0.12077973, replace `ALooper_pollAll` with `ALooper_pollOnce` ([#2663](https://github.com/maplibre/maplibre-native/pull/2663)). +- Remove OkHttp3 ProGuard rules ([#2665](https://github.com/maplibre/maplibre-native/pull/2665)). +- Use C++20 ([#2659](https://github.com/maplibre/maplibre-native/pull/2659)). +- Reuse prefetched tiles to avoid empty screen ([#2668](https://github.com/maplibre/maplibre-native/pull/2668)). +- Update Android Dependencies, use [maplibre-gestures-android](https://github.com/maplibre/maplibre-gestures-android) ([#2714](https://github.com/maplibre/maplibre-native/pull/2714)). +- Update dependency gradle to v8.10 ([#2721](https://github.com/maplibre/maplibre-native/pull/2721)). +- Cleanup `mbgl/actor/mailbox*` implementation for repetition in ensuring valid weakScheduler exists before usage ([#2733](https://github.com/maplibre/maplibre-native/pull/2733)). +- Use latest MapLibre Style Spec ([#2756](https://github.com/maplibre/maplibre-native/pull/2756)). + This PR adds two new APIs to `TransitionOptions` of `LocationIndicatorLayer`: `getBearingTransition()` and `setBearingTransition()`. +- Use timestamps for attribute updates ([#2629](https://github.com/maplibre/maplibre-native/pull/2629)). + +### 🐞 Bug fixes + +- Fix crash when feature contains invalid UTF-8 data ([#2693](https://github.com/maplibre/maplibre-native/pull/2693)). +- Fix accidental regression conditional layer evaluation ([#2705](https://github.com/maplibre/maplibre-native/pull/2705)). +- Ensure `ReentrantLock` is unlocked after being locked, and on same thread ([#2759](https://github.com/maplibre/maplibre-native/pull/2759)). This is the first (code) contributon from [@westnordost](https://github.com/westnordost)! 🎉 +- Add guard blocks and checks to `SymbolInstance` ([#2744](https://github.com/maplibre/maplibre-native/pull/2744)). + This fixes an exceedingly rare crash that a user is seeing in the field. The fix is not pretty, but we hope to better understand the problem in the future (see [this open issue](https://github.com/maplibre/maplibre-native/issues/2350)). + ## 11.1.0 ### ✨ Features and improvements diff --git a/platform/android/MapLibreAndroid/gradle.properties b/platform/android/MapLibreAndroid/gradle.properties index c24b7a5a6..b4fbd2c0b 100644 --- a/platform/android/MapLibreAndroid/gradle.properties +++ b/platform/android/MapLibreAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=11.1.0 +VERSION_NAME=11.2.0 # Only build native dependencies for the current ABI # See https://code.google.com/p/android/issues/detail?id=221098#c20 diff --git a/scripts/generate-changelog.mjs b/scripts/generate-changelog.mjs index 2bb37a1dd..7deaddfb1 100755 --- a/scripts/generate-changelog.mjs +++ b/scripts/generate-changelog.mjs @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { simpleGit } from 'simple-git'; +import { simpleGit } from "simple-git"; import * as fs from "node:fs"; /** @@ -13,9 +13,13 @@ function usage() { const platform = process.argv.at(2); function getTagLastVersion() { - if (platform === "ios") { - const lastVersion = fs.readFileSync("platform/ios/CHANGELOG.md", "utf-8").split('\n').filter(line => line.startsWith('##'))[1].slice(3); - return `ios-v${lastVersion}`; + if (platform === "ios" || platform === "android") { + const lastVersion = fs + .readFileSync(`platform/${platform}/CHANGELOG.md`, "utf-8") + .split("\n") + .filter((line) => line.startsWith("## "))[1] + .slice(3); + return `${platform}-v${lastVersion}`; } usage(); } @@ -25,22 +29,22 @@ const tagLastVersion = getTagLastVersion(); const git = simpleGit(); /** - * - * @param {string} tag - * @returns + * + * @param {string} tag + * @returns */ async function getCommit(tag) { const result = await git.show(tag); const match = result.match(/^commit\s([0-9a-f]{40})/m); - + if (match) return match[1]; else throw new Error("Failed to find commit"); } /** - * - * @param {string} message - * @returns + * + * @param {string} message + * @returns */ function formatMessageToMarkdownLink(message) { // Regular expression to match the issue number pattern @@ -49,10 +53,10 @@ function formatMessageToMarkdownLink(message) { // Check if a match is found if (match) { - const issueNumber = match[1]; - const link = `https://github.com/maplibre/maplibre-native/pull/${issueNumber}`; - // Replace the issue number in the message with the Markdown link - return message.replace(regex, `[#${issueNumber}](${link})`); + const issueNumber = match[1]; + const link = `https://github.com/maplibre/maplibre-native/pull/${issueNumber}`; + // Replace the issue number in the message with the Markdown link + return message.replace(regex, `[#${issueNumber}](${link})`); } // Return the original message if no issue number is found @@ -61,7 +65,7 @@ function formatMessageToMarkdownLink(message) { const commitLastVersion = await getCommit(tagLastVersion); -const logs = await git.log({from: commitLastVersion}); +const logs = await git.log({ from: commitLastVersion }); for await (const logEntry of logs.all.toReversed()) { console.log(`- ${formatMessageToMarkdownLink(logEntry.message)}.`); -} \ No newline at end of file +}