Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.12.0" apply false
id("org.jetbrains.kotlin.android") version "2.1.21" apply false
id("org.jlleitschuh.gradle.ktlint") version "13.1.+" apply false
id("org.jlleitschuh.gradle.ktlint") version "14.0.+" apply false
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a dynamic plugin version org.jlleitschuh.gradle.ktlint:14.0.+ is a supply-chain risk and security misconfiguration. A compromised or unstable future 14.0.x release could be pulled into builds, potentially executing malicious code or breaking CI. Pin to an exact version (e.g., 14.0.1) and enable dependency locking to ensure reproducible, secure builds.

Suggested change
id("org.jlleitschuh.gradle.ktlint") version "14.0.+" apply false
id("org.jlleitschuh.gradle.ktlint") version "14.0.1" apply false

Copilot uses AI. Check for mistakes.
}

include(":app")
1 change: 1 addition & 0 deletions maplibre/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ in release builds on Android.

### New Features

- Upgrade MapLibre Native on Android to [12.2](https://github.com/maplibre/maplibre-native/blob/main/platform/android/CHANGELOG.md#1220).
- Optimize package size on `pub.dev` by restructuring the repository.
- Upgrade `jni` / `jnigen` to ^0.15.1.

Expand Down
8 changes: 4 additions & 4 deletions maplibre/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ buildscript {
}

dependencies {
classpath("com.android.tools.build:gradle:8.12.3")
classpath("com.android.tools.build:gradle:8.13.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
// noinspection GradleDynamicVersion
classpath("org.jlleitschuh.gradle:ktlint-gradle:13.1.+")
classpath("org.jlleitschuh.gradle:ktlint-gradle:14.0.+")
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a dynamic plugin version org.jlleitschuh.gradle:ktlint-gradle:14.0.+ is a supply-chain risk and a security misconfiguration. A compromised or buggy future 14.0.x release could be automatically consumed during builds, potentially executing malicious code in the CI/build environment. Pin to an exact version (e.g., 14.0.1) and use dependency locking to ensure reproducible and secure builds.

Copilot uses AI. Check for mistakes.
}
}

Expand Down Expand Up @@ -67,7 +67,7 @@ android {

dependencies {
// jnigen picks up api dependencies
api 'org.maplibre.gl:android-sdk:12.0.+'
api 'org.maplibre.gl:android-sdk:12.2.+'
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a discrepancy between the PR description and the actual code changes. The PR description states that org.maplibre.gl:android-sdk was updated from 12.0.+ to 12.1.3, but the actual code shows it's being updated to 12.2.+ (which matches the PR title).

The dynamic version pattern 12.2.+ will resolve to the latest 12.2.x version available (e.g., 12.2.0, 12.2.1, etc.), which is the correct approach here. However, the PR description should be updated to reflect the actual version pattern being used.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a dynamic dependency version org.maplibre.gl:android-sdk:12.2.+ is a supply-chain risk and a security misconfiguration. An attacker compromising a future 12.2.x release or a malicious artifact in the repository could be pulled into production builds without code changes, leading to unintended behavior or compromise. Pin the dependency to an exact, vetted version (e.g., 12.2.3) or use a strict version constraint and lockfile to ensure reproducible builds.

Suggested change
api 'org.maplibre.gl:android-sdk:12.2.+'
api 'org.maplibre.gl:android-sdk:12.2.3'

Copilot uses AI. Check for mistakes.
testImplementation "org.jetbrains.kotlin:kotlin-test"
testImplementation "org.mockito:mockito-core:5.20.+"
}
Expand Down Expand Up @@ -95,7 +95,7 @@ ktlint {
}
dependencies {
// noinspection GradleDynamicVersion
ktlintRuleset("io.nlopez.compose.rules:ktlint:0.4.27")
ktlintRuleset("io.nlopez.compose.rules:ktlint:0.5.0")
}
filter {
exclude("**/*.g.kt")
Expand Down
35 changes: 35 additions & 0 deletions maplibre/lib/src/platform/android/jni.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64704,6 +64704,41 @@ class MapLibreMap extends jni$_.JObject {
).check();
}

static final _id_setFrustumOffset = _class.instanceMethodId(
r'setFrustumOffset',
r'(Landroid/graphics/RectF;)V',
);

static final _setFrustumOffset =
jni$_.ProtectedJniExtensions.lookup<
jni$_.NativeFunction<
jni$_.JThrowablePtr Function(
jni$_.Pointer<jni$_.Void>,
jni$_.JMethodIDPtr,
jni$_.VarArgs<(jni$_.Pointer<jni$_.Void>,)>,
)
>
>('globalEnv_CallVoidMethod')
.asFunction<
jni$_.JThrowablePtr Function(
jni$_.Pointer<jni$_.Void>,
jni$_.JMethodIDPtr,
jni$_.Pointer<jni$_.Void>,
)
>();

/// from: `public void setFrustumOffset(android.graphics.RectF rectF)`
void setFrustumOffset(
RectF rectF,
) {
final _$rectF = rectF.reference;
_setFrustumOffset(
reference.pointer,
_id_setFrustumOffset as jni$_.JMethodIDPtr,
_$rectF.pointer,
).check();
}

static final _id_setSwapBehaviorFlush = _class.instanceMethodId(
r'setSwapBehaviorFlush',
r'(Z)V',
Expand Down
Loading