Skip to content

Commit

Permalink
Cherry-pick upstream#710, #852, #904 + small fixes (#69)
Browse files Browse the repository at this point in the history
* 710 (Get rid of MapboxGlPlatform.getInstance) flutter-mapbox-gl/maps#710
* 852( Android embedding fixes - migrate to maven) flutter-mapbox-gl/maps#852 was also required to fix compile time errors
* a small fix for the platform dependency
* Update CI flutter version
* cherry-pick upstream#904 (fix android build issues)

Co-authored-by: shroff <502644+shroff@users.noreply.github.com>
Co-authored-by: Felix Horvat <24698503+felix-ht@users.noreply.github.com>
  • Loading branch information
3 people authored May 13, 2022
1 parent d02cc3d commit d23b229
Show file tree
Hide file tree
Showing 13 changed files with 125 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flutter_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch]

env:
FLUTTER_CHANNEL: 'stable'
FLUTTER_VERSION: '2.5.3'
FLUTTER_VERSION: '2.10.5'

jobs:
format:
Expand Down
7 changes: 4 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version '1.0-SNAPSHOT'
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -15,15 +15,16 @@ buildscript {
rootProject.allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 29

compileSdkVersion 31
ndkVersion "20.1.5948944"

defaultConfig {
minSdkVersion 20
Expand Down
5 changes: 3 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31
ndkVersion "20.1.5948944"

lintOptions {
disable 'InvalidPackage'
Expand All @@ -35,7 +36,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.mapbox.mapboxglexample"
minSdkVersion 20
targetSdkVersion 28
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
3 changes: 2 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="mapbox_gl_example"
android:icon="@mipmap/ic_launcher">

<activity
android:name=".MainActivity"
android:exported="false"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -12,7 +12,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
1 change: 1 addition & 0 deletions example/lib/generated_plugin_registrant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Generated file. Do not edit.
//

// ignore_for_file: directives_ordering
// ignore_for_file: lines_longer_than_80_chars

import 'package:location_web/location_web.dart';
Expand Down
2 changes: 2 additions & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ dependencies:
path_provider: ^2.0.0
http: ^0.13.0
collection: ^1.0.0
# temporary fix:
platform: ^3.1.0

dependency_overrides:
maplibre_gl_platform_interface:
Expand Down
Loading

0 comments on commit d23b229

Please sign in to comment.