-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Overview - [x] generate bindings using jnigen - [x] integrate into the MapController - [x] replace some pigeon functions with jni - [x] fix web compilation errors - [x] fix proguard for release builds - [x] bump min flutter version to 3.24.0 (min dart version to 3.5.0) because meta ^0.15.0 is required by jni. ## Issue - #52
- Loading branch information
Showing
206 changed files
with
109,438 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-keep class org.maplibre.android.attribution.** { public *; } | ||
-keep class org.maplibre.android.camera.** { public *; } | ||
-keep class org.maplibre.android.constants.** { public *; } | ||
-keep class org.maplibre.android.exceptions.** { public *; } | ||
-keep class org.maplibre.android.geometry.** { public *; } | ||
-keep class org.maplibre.android.http.** { public *; } | ||
-keep class org.maplibre.android.location.** { public *; } | ||
-keep class org.maplibre.android.log.** { public *; } | ||
-keep class org.maplibre.android.maps.** { public *; } | ||
-keep class org.maplibre.android.offline.** { public *; } | ||
-keep class org.maplibre.android.storage.** { public *; } | ||
-keep class org.maplibre.android.style.layers.** { public *; } | ||
-keep class org.maplibre.android.style.light.** { public *; } | ||
-keep class org.maplibre.android.style.sources.** { public *; } | ||
-keep class org.maplibre.android.style.types.** { public *; } | ||
-keep class org.maplibre.android.text.** { public *; } | ||
-keep class org.maplibre.android.util.** { public *; } | ||
-keep class org.maplibre.android.utils.** { public *; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
rootProject.name = 'maplibre' | ||
|
||
include ':MapLibreAndroid' | ||
project(':MapLibreAndroid').projectDir = new File('../example/android/MapLibreAndroid') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,4 +94,4 @@ class MapLibreMapFactory( | |
|
||
interface LifecycleProvider { | ||
fun getLifecycle(): Lifecycle? | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
android/src/main/kotlin/com/github/josxha/maplibre/MapLibreRegistry.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.github.josxha.maplibre | ||
|
||
import androidx.annotation.Keep | ||
import org.maplibre.android.maps.MapLibreMap | ||
|
||
@Keep | ||
object MapLibreRegistry { | ||
private val mapRegistry = HashMap<Int, MapLibreMap>() | ||
|
||
@Suppress("RedundantVisibilityModifier") | ||
@Keep | ||
public fun getMap(viewId: Int): MapLibreMap? = mapRegistry[viewId] | ||
|
||
fun addMap(viewId: Int, map: MapLibreMap) { | ||
mapRegistry[viewId] = map | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gradle/ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
configurations.maybeCreate("default") | ||
artifacts.add("default", file('MapLibreAndroid-10.5.0.aar')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ plugins { | |
} | ||
|
||
include ":app" | ||
include ':MapLibreAndroid' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
preamble: | | ||
// Autogenerated by jnigen. DO NOT EDIT! | ||
// ignore_for_file: public_member_api_docs | ||
// ignore_for_file: require_trailing_commas | ||
// ignore_for_file: unnecessary_raw_strings | ||
// ignore_for_file: avoid_field_initializers_in_const_classes | ||
// ignore_for_file: avoid_equals_and_hash_code_on_mutable_classes | ||
// ignore_for_file: sort_constructors_first | ||
// ignore_for_file: avoid_positional_boolean_parameters | ||
// ignore_for_file: sort_unnamed_constructors_first | ||
// ignore_for_file: always_use_package_imports | ||
// ignore_for_file: use_late_for_private_fields_and_variables | ||
// ignore_for_file: one_member_abstracts | ||
// ignore_for_file: always_put_required_named_parameters_first | ||
android_sdk_config: | ||
add_gradle_deps: true | ||
android_example: 'example/' | ||
suspend_fun_to_async: true | ||
output: | ||
dart: | ||
path: 'lib/src/jni/' | ||
source_path: | ||
- 'android/src/main' | ||
classes: | ||
# https://github.com/maplibre/maplibre-native/tree/main/platform/android/MapLibreAndroid/src/main/java/org/maplibre/android | ||
- 'android.app.Activity' | ||
- 'android.graphics.PointF' | ||
- 'com.github.josxha.maplibre.MapLibreRegistry' | ||
- 'org.maplibre.android.attribution' | ||
- 'org.maplibre.android.camera' | ||
- 'org.maplibre.android.constants' | ||
- 'org.maplibre.android.exceptions' | ||
- 'org.maplibre.android.geometry' | ||
- 'org.maplibre.android.http' | ||
- 'org.maplibre.android.location' | ||
- 'org.maplibre.android.log' | ||
- 'org.maplibre.android.maps' | ||
- 'org.maplibre.android.offline' | ||
- 'org.maplibre.android.storage' | ||
- 'org.maplibre.android.style.layers' | ||
- 'org.maplibre.android.style.light' | ||
- 'org.maplibre.android.style.sources' | ||
- 'org.maplibre.android.style.types' | ||
- 'org.maplibre.android.text' | ||
- 'org.maplibre.android.util' | ||
- 'org.maplibre.android.utils' |
Oops, something went wrong.