Skip to content

Commit

Permalink
Prepare for MapLibre Native Android 11.2.0 release (#2772)
Browse files Browse the repository at this point in the history
  • Loading branch information
louwers authored Aug 27, 2024
1 parent 1a308dd commit 84bcf8c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 18 deletions.
26 changes: 26 additions & 0 deletions platform/android/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion platform/android/MapLibreAndroid/gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
38 changes: 21 additions & 17 deletions scripts/generate-changelog.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import { simpleGit } from 'simple-git';
import { simpleGit } from "simple-git";
import * as fs from "node:fs";

/**
Expand All @@ -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();
}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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)}.`);
}
}

0 comments on commit 84bcf8c

Please sign in to comment.