Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c186fe7

Browse files
Merge pull request #27 from Baseflow/update_google_api_availability_plugin
Updated plugin and made small improvements and changes
2 parents acd40d1 + 4be9888 commit c186fe7

19 files changed

+119
-84
lines changed

‎CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 3.0.2
2+
3+
* Updated `pubspec.yaml` to newer versions of `SDK` and `flutter` and adding `flutter_lints` as a dependency;
4+
* Updated `analysis_options.yaml` for using `flutter_lints`;
5+
* Updated code according to the set lint rule(s);
6+
* Updated `compileSdkVersion` and `targetSdkVersion` in the `build.gradle`
7+
* Fixed bug were starting the example app would close on running for the first time by adding internet permission in the `AndroidManifest`
8+
19
## 3.0.1
210

311
* Added unit-tests to guard API against breaking changes.

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To use this plugin, add `google_api_availability` as a [dependency in your pubsp
1414

1515
```yaml
1616
dependencies:
17-
google_api_availability: ^3.0.1
17+
google_api_availability: ^3.0.2
1818
```
1919
2020
> **NOTE:** There's a known issue with integrating plugins that use Swift into a Flutter project created with the Objective-C template. See issue [Flutter#16049](https://github.com/flutter/flutter/issues/16049) for help on integration.

‎analysis_options.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
include: package:pedantic/analysis_options.yaml
1+
include: package:flutter_lints/flutter.yaml
22

33
analyzer:
44
exclude:
55
# Ignore generated files
66
- '**/*.g.dart'
77
- 'lib/src/generated/*.dart'
8-
# workaround for https://github.com/dart-lang/sdk/issues/42910
9-
- 'example/**'
108
linter:
119
rules:
1210
- public_member_api_docs

‎android/build.gradle

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,33 @@ version '1.0-SNAPSHOT'
44
buildscript {
55
repositories {
66
google()
7-
jcenter()
7+
mavenCentral()
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.6.1'
11+
classpath 'com.android.tools.build:gradle:4.1.0'
1212
}
1313
}
1414

1515
rootProject.allprojects {
1616
repositories {
1717
google()
18-
jcenter()
18+
mavenCentral()
1919
}
2020
}
2121

2222
apply plugin: 'com.android.library'
2323

2424
android {
25-
compileSdkVersion 28
25+
compileSdkVersion 31
26+
27+
compileOptions {
28+
sourceCompatibility JavaVersion.VERSION_1_8
29+
targetCompatibility JavaVersion.VERSION_1_8
30+
}
2631

2732
defaultConfig {
28-
minSdkVersion 16
33+
minSdkVersion 16
2934
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3035
}
3136
lintOptions {

‎example/android/app/build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ apply plugin: 'com.android.application'
2525
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2626

2727
android {
28-
compileSdkVersion 29
28+
compileSdkVersion flutter.compileSdkVersion
29+
30+
compileOptions {
31+
sourceCompatibility JavaVersion.VERSION_1_8
32+
targetCompatibility JavaVersion.VERSION_1_8
33+
}
2934

3035
lintOptions {
3136
disable 'InvalidPackage'
@@ -34,8 +39,8 @@ android {
3439
defaultConfig {
3540
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3641
applicationId "com.baseflow.googleapiavailabilityexample"
37-
minSdkVersion 16
38-
targetSdkVersion 29
42+
minSdkVersion flutter.minSdkVersion
43+
targetSdkVersion flutter.targetSdkVersion
3944
versionCode flutterVersionCode.toInteger()
4045
versionName flutterVersionName
4146
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
xmlns:tools="http://schemas.android.com/tools"
33
package="com.baseflow.googleapiavailabilityexample">
44

5+
<uses-permission android:name="android.permission.INTERNET" />
6+
57
<application
6-
android:name="io.flutter.app.FlutterApplication"
8+
android:name="${applicationName}"
79
android:icon="@mipmap/ic_launcher"
810
android:label="google_api_availability_example"
911
tools:ignore="AllowBackup,GoogleAppIndexingWarning">
@@ -34,7 +36,6 @@
3436
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale"
3537
android:hardwareAccelerated="true"
3638
android:windowSoftInputMode="adjustResize" />
37-
3839
<meta-data android:name="flutterEmbedding" android:value="2"/>
3940
</application>
4041
</manifest>

‎example/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
buildscript {
22
repositories {
33
google()
4-
jcenter()
4+
mavenCentral()
55
}
66

77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.6.1'
8+
classpath 'com.android.tools.build:gradle:4.1.0'
99
}
1010
}
1111

1212
allprojects {
1313
repositories {
1414
google()
15-
jcenter()
15+
mavenCentral()
1616
}
1717
}
1818

‎example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

‎example/ios/Flutter/Flutter.podspec

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎example/lib/main.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import 'package:flutter/material.dart';
44
import 'package:flutter/services.dart';
55
import 'package:google_api_availability/google_api_availability.dart';
66

7-
void main() => runApp(MyApp());
7+
void main() => runApp(constMyApp());
88

9+
///Creates the mutable state for this widget
910
class MyApp extends StatefulWidget {
11+
///Named [key] parameter to identify a widget
12+
const MyApp({Key? key}) : super(key: key);
13+
1014
@override
1115
_MyAppState createState() => _MyAppState();
1216
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /