Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-docusaurus
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha committed Jun 24, 2024
2 parents cd72a76 + 887ee1c commit fdf455c
Show file tree
Hide file tree
Showing 24 changed files with 18 additions and 22 deletions.
8 changes: 5 additions & 3 deletions maplibre_gl/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ group 'org.maplibre.maplibregl'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.9.0'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

Expand All @@ -20,15 +22,15 @@ rootProject.allprojects {
}

apply plugin: 'com.android.library'
apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'kotlin-android'

android {
if (project.android.hasProperty("namespace")) {
namespace 'org.maplibre.maplibregl'
}

compileSdkVersion 34
ndkVersion "20.1.5948944"
ndkVersion "26.1.10909125"

defaultConfig {
minSdkVersion 21
Expand Down
3 changes: 1 addition & 2 deletions maplibre_gl/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Sat Mar 06 23:07:28 CET 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -1770,15 +1770,17 @@ private void destroyMapViewIfNecessary() {
if (mapView == null) {
return;
}
mapViewContainer.removeView(mapView);
mapView.onStop();
mapView.onDestroy();

if (locationComponent != null) {
locationComponent.setLocationComponentEnabled(false);
}
stopListeningForLocationUpdates();

mapViewContainer.removeView(mapView);

mapView.onStop();
mapView.onDestroy();

mapView = null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@

package org.maplibre.maplibregl;

import android.app.Activity;
import android.app.Application;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleRegistry;
import io.flutter.embedding.engine.plugins.FlutterPlugin;
import io.flutter.embedding.engine.plugins.activity.ActivityAware;
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
import io.flutter.embedding.engine.plugins.lifecycle.HiddenLifecycleReference;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.PluginRegistry.Registrar;

/**
* Plugin for controlling a set of MapLibreMap views to be shown as overlays on top of the Flutter
Expand All @@ -27,8 +21,6 @@
*/
public class MapLibreMapsPlugin implements FlutterPlugin, ActivityAware {

private static final String VIEW_TYPE = "plugins.flutter.io/maplibre_gl";

static FlutterAssets flutterAssets;
private Lifecycle lifecycle;

Expand Down
Empty file removed maplibre_gl/ios/Assets/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions maplibre_gl/ios/maplibre_gl.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ A new Flutter plugin.
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => '[email protected]' }
s.source = { :path => '.' }
s.source_files = 'maplibre_gl_ios/Sources/maplibre_gl_ios/**/*'
s.source_files = 'maplibre_gl/Sources/maplibre_gl/**/*'
s.dependency 'Flutter'
# When updating the dependency version,
# make sure to also update the version Package.swift.
# make sure to also update the version in Package.swift.
s.dependency 'MapLibre', '6.5.0'
s.swift_version = '5.0'
s.ios.deployment_target = '12.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@
import PackageDescription

let package = Package(
name: "maplibre_gl_ios",
name: "maplibre_gl",
platforms: [
.iOS("12.0"),
],
products: [
.library(name: "maplibre-gl-ios", targets: ["maplibre_gl_ios"])
.library(name: "maplibre-gl", targets: ["maplibre_gl"])
],
dependencies: [
// When updating the dependency version,
// make sure to also update the version in maplibre_gl.podspec.
.package(url: "https://github.com/maplibre/maplibre-gl-native-distribution.git", exact: "6.5.0"),
],
targets: [
.target(
name: "maplibre_gl_ios",
name: "maplibre_gl",
dependencies: [
.product(name: "MapLibre", package: "maplibre-gl-native-distribution")
],
cSettings: [
.headerSearchPath("include/maplibre_gl_ios")
.headerSearchPath("include/maplibre_gl")
]
)
]
Expand Down

0 comments on commit fdf455c

Please sign in to comment.