Skip to content

Commit 5812619

Browse files
committed
Add support for Windows, MacOS and Linux
1 parent 04ef1c1 commit 5812619

File tree

95 files changed

+2834
-173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2834
-173
lines changed

.gitignore

+2-65
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,7 @@
1-
# Miscellaneous
2-
*.class
3-
*.log
4-
*.pyc
5-
*.swp
61
.DS_Store
7-
.atom/
8-
.buildlog/
9-
.history
10-
.svn/
11-
12-
# IntelliJ related
13-
*.iml
14-
*.ipr
15-
*.iws
16-
.idea/
17-
18-
# Visual Studio Code related
19-
.vscode/
20-
21-
# Flutter/Dart/Pub related
22-
**/doc/api/
232
.dart_tool/
24-
.flutter-plugins
3+
254
.packages
26-
.pub-cache/
275
.pub/
28-
build/
29-
30-
# Android related
31-
**/android/**/gradle-wrapper.jar
32-
**/android/.gradle
33-
**/android/captures/
34-
**/android/gradlew
35-
**/android/gradlew.bat
36-
**/android/local.properties
37-
**/android/**/GeneratedPluginRegistrant.java
386

39-
# iOS/XCode related
40-
**/ios/**/*.mode1v3
41-
**/ios/**/*.mode2v3
42-
**/ios/**/*.moved-aside
43-
**/ios/**/*.pbxuser
44-
**/ios/**/*.perspectivev3
45-
**/ios/**/*sync/
46-
**/ios/**/.sconsign.dblite
47-
**/ios/**/.tags*
48-
**/ios/**/.vagrant/
49-
**/ios/**/DerivedData/
50-
**/ios/**/Icon?
51-
**/ios/**/Pods/
52-
**/ios/**/.symlinks/
53-
**/ios/**/profile
54-
**/ios/**/xcuserdata
55-
**/ios/.generated/
56-
**/ios/Flutter/App.framework
57-
**/ios/Flutter/Flutter.framework
58-
**/ios/Flutter/Generated.xcconfig
59-
**/ios/Flutter/app.flx
60-
**/ios/Flutter/app.zip
61-
**/ios/Flutter/flutter_assets/
62-
**/ios/ServiceDefinitions.json
63-
**/ios/Runner/GeneratedPluginRegistrant.*
64-
65-
# Exceptions to above rules.
66-
!**/ios/**/default.mode1v3
67-
!**/ios/**/default.mode2v3
68-
!**/ios/**/default.pbxuser
69-
!**/ios/**/default.perspectivev3
70-
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
7+
build/

.idea/libraries/Dart_SDK.xml

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/example_lib_main_dart.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.0.1
2+
3+
* Fix Google Maps URLs being broken on Windows, MacOS and Linux
4+
* Fix platform support not being recognized by pub
5+
16
## 2.0.0
27

38
* Add null-safety support (thank you to [orevial](https://github.com/orevial)!)

analysis_options.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
# Additional information about this file can be found at
4+
# https://dart.dev/guides/language/analysis-options

android/build.gradle

+14-7
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,44 @@ buildscript {
55
ext.kotlin_version = '1.3.50'
66
repositories {
77
google()
8-
jcenter()
8+
mavenCentral()
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.5.0'
12+
classpath 'com.android.tools.build:gradle:4.1.0'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}
1616

1717
rootProject.allprojects {
1818
repositories {
1919
google()
20-
jcenter()
20+
mavenCentral()
2121
}
2222
}
2323

2424
apply plugin: 'com.android.library'
2525
apply plugin: 'kotlin-android'
2626

2727
android {
28-
compileSdkVersion 28
28+
compileSdkVersion 30
29+
30+
compileOptions {
31+
sourceCompatibility JavaVersion.VERSION_1_8
32+
targetCompatibility JavaVersion.VERSION_1_8
33+
}
34+
35+
kotlinOptions {
36+
jvmTarget = '1.8'
37+
}
2938

3039
sourceSets {
3140
main.java.srcDirs += 'src/main/kotlin'
3241
}
42+
3343
defaultConfig {
3444
minSdkVersion 16
3545
}
36-
lintOptions {
37-
disable 'InvalidPackage'
38-
}
3946
}
4047

4148
dependencies {

android/gradle.properties

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
2-
android.enableR8=true
32
android.useAndroidX=true
43
android.enableJetifier=true

android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip

android/src/main/kotlin/com/example/maps_launcher/MapsLauncherPlugin.kt

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import io.flutter.plugin.common.MethodCall
77
import io.flutter.plugin.common.MethodChannel
88
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
99
import io.flutter.plugin.common.MethodChannel.Result
10-
import io.flutter.plugin.common.PluginRegistry.Registrar
1110

1211
/** MapsLauncherPlugin */
1312
class MapsLauncherPlugin: FlutterPlugin, MethodCallHandler {

example/analysis_options.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

example/android/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
99
# Remember to never publicly share your keystore.
1010
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
1111
key.properties
12+
**/*.keystore
13+
**/*.jks

example/android/app/build.gradle

+11-6
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,26 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 28
29+
compileSdkVersion 30
3030

31-
sourceSets {
32-
main.java.srcDirs += 'src/main/kotlin'
31+
compileOptions {
32+
sourceCompatibility JavaVersion.VERSION_1_8
33+
targetCompatibility JavaVersion.VERSION_1_8
34+
}
35+
36+
kotlinOptions {
37+
jvmTarget = '1.8'
3338
}
3439

35-
lintOptions {
36-
disable 'InvalidPackage'
40+
sourceSets {
41+
main.java.srcDirs += 'src/main/kotlin'
3742
}
3843

3944
defaultConfig {
4045
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4146
applicationId "com.example.maps_launcher_example"
4247
minSdkVersion 16
43-
targetSdkVersion 28
48+
targetSdkVersion 30
4449
versionCode flutterVersionCode.toInteger()
4550
versionName flutterVersionName
4651
}

example/android/app/src/main/AndroidManifest.xml

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.example.maps_launcher_example">
3-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
4-
calls FlutterMain.startInitialization(this); in its onCreate method.
5-
In most cases you can leave this as-is, but you if you want to provide
6-
additional functionality it is fine to subclass or reimplement
7-
FlutterApplication and put your custom class here. -->
8-
<application
9-
android:name="io.flutter.app.FlutterApplication"
3+
<application
104
android:label="maps_launcher_example"
115
android:icon="@mipmap/ic_launcher">
126
<activity
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5+
<!-- Show a splash screen on the activity. Automatically removed when
6+
Flutter draws its first frame -->
7+
<item name="android:windowBackground">@drawable/launch_background</item>
8+
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
18+
</resources>
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<!-- Theme applied to the Android Window while the process is starting -->
4-
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
66
Flutter draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
@@ -12,7 +12,7 @@
1212
running.
1313
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15-
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16-
<item name="android:windowBackground">@android:color/white</item>
15+
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
1717
</style>
1818
</resources>

example/android/build.gradle

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,25 @@ buildscript {
22
ext.kotlin_version = '1.3.50'
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.5.0'
9+
classpath 'com.android.tools.build:gradle:4.1.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
1313

1414
allprojects {
1515
repositories {
1616
google()
17-
jcenter()
17+
mavenCentral()
1818
}
1919
}
2020

2121
rootProject.buildDir = '../build'
2222
subprojects {
2323
project.buildDir = "${rootProject.buildDir}/${project.name}"
24-
}
25-
subprojects {
2624
project.evaluationDependsOn(':app')
2725
}
2826

0 commit comments

Comments
 (0)