Skip to content

Commit bc799b6

Browse files
authored
Merge branch 'main' into bugfix/location-enabled
2 parents 44bd0e3 + a24775b commit bc799b6

File tree

129 files changed

+632
-495
lines changed

Some content is hidden

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

129 files changed

+632
-495
lines changed

.github/workflows/geolocator.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ jobs:
3333
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3434
- uses: actions/checkout@v4
3535

36-
# Ensures JAVA 11 is installed on the build agent.
36+
# Ensures JAVA 17 is installed on the build agent.
3737
- uses: actions/setup-java@v4
3838
with:
3939
distribution: 'temurin'
40-
java-version: '11'
40+
java-version: '17'
4141

4242
# Make sure the stable version of Flutter is available
4343
- uses: subosito/flutter-action@v2
@@ -49,8 +49,8 @@ jobs:
4949
run: flutter pub get
5050
working-directory: ${{env.source-directory}}
5151

52-
# Run Flutter Format to ensure formatting is valid
53-
- name: Run Flutter Format
52+
# Run Dart Format to ensure formatting is valid
53+
- name: Run Dart Format
5454
run: dart format --set-exit-if-changed .
5555
working-directory: ${{env.source-directory}}
5656

.github/workflows/geolocator_android.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- uses: actions/setup-java@v4
3838
with:
3939
distribution: 'temurin'
40-
java-version: '11'
40+
java-version: '17'
4141

4242
# Make sure the stable version of Flutter is available
4343
- uses: subosito/flutter-action@v2

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ unlinked.ds
5858
unlinked_spec.ds
5959
flutter_export_environment.sh
6060
**/.flutter-plugins-dependencies
61+
**/Flutter/ephemeral/
6162

6263
# Android related
6364
gradle-wrapper.jar
@@ -95,6 +96,8 @@ GeneratedPluginRegistrant.java
9596
**/ios/ServiceDefinitions.json
9697
**/ios/Runner/GeneratedPluginRegistrant.*
9798
**/ios/Flutter/Flutter.podspec
99+
**/.build/
100+
**/.swiftpm/
98101

99102
# Firebase related
100103
.firebase/

geolocator/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## NEXT
2+
3+
- Bump `flutter_lints` to version of afp to 5.0.0
4+
5+
## 13.0.4
6+
7+
- Bump `flutter_lints` to version 5.0.0. Later added: of afp example project.
8+
9+
## 13.0.3
10+
11+
- Updates dart sdk to `sdk: ^3.5.0`
12+
- Updates example project and fixes analyzer issues
13+
14+
## 13.0.2
15+
16+
- Updates dependency on geolocator_apple to version 2.3.8.
17+
- Migrates Android configuration of example app away from imperative gradle API.
18+
119
## 13.0.1
220

321
- Resolves problems when compiling non-web platforms because of illegal reference to `dart:js_interop`.

geolocator/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ The TL;DR version is:
4242
android.useAndroidX=true
4343
android.enableJetifier=true
4444
```
45-
2. Make sure you set the `compileSdkVersion` in your "android/app/build.gradle" file to 34:
45+
2. Make sure you set the `compileSdkVersion` in your "android/app/build.gradle" file to 35:
4646

4747
```
4848
android {
49-
compileSdkVersion 34
49+
compileSdkVersion 35
5050
5151
...
5252
}

geolocator/example/android/app/build.gradle

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
plugins {
2+
id "com.android.application"
3+
id "dev.flutter.flutter-gradle-plugin"
4+
}
5+
16
def localProperties = new Properties()
27
def localPropertiesFile = rootProject.file('local.properties')
38
if (localPropertiesFile.exists()) {
@@ -6,11 +11,6 @@ if (localPropertiesFile.exists()) {
611
}
712
}
813

9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
1414
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1515
if (flutterVersionCode == null) {
1616
flutterVersionCode = '1'
@@ -27,18 +27,15 @@ project.getTasks().withType(JavaCompile) {
2727
options.compilerArgs.addAll(args)
2828
}
2929

30-
apply plugin: 'com.android.application'
31-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
32-
3330
android {
34-
compileSdkVersion 33
31+
compileSdkVersion flutter.compileSdkVersion
3532

3633

3734
defaultConfig {
3835
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3936
applicationId "com.baseflow.geolocator_example"
40-
minSdkVersion 16
41-
targetSdkVersion 30
37+
minSdkVersion flutter.minSdkVersion
38+
targetSdkVersion flutter.targetSdkVersion
4239
versionCode flutterVersionCode.toInteger()
4340
versionName flutterVersionName
4441
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
android:theme="@style/LaunchTheme"
2020
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
2121
android:hardwareAccelerated="true"
22-
android:windowSoftInputMode="adjustResize">
22+
android:windowSoftInputMode="adjustResize"
23+
android:exported="true">
2324
<!-- Specifies an Android theme to apply to this Activity as soon as
2425
the Android process has started. This theme is visible to the user
2526
while the Flutter UI initializes. After that, this theme continues
Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
buildscript {
2-
repositories {
3-
google()
4-
mavenCentral()
5-
}
6-
7-
dependencies {
8-
classpath 'com.android.tools.build:gradle:7.1.2'
9-
}
10-
}
11-
121
allprojects {
132
repositories {
143
google()
@@ -24,6 +13,6 @@ subprojects {
2413
project.evaluationDependsOn(':app')
2514
}
2615

27-
task clean(type: Delete) {
16+
tasks.register("clean", Delete) {
2817
delete rootProject.buildDir
2918
}

geolocator/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-7.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}()
29

3-
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
411

5-
def plugins = new Properties()
6-
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7-
if (pluginsFile.exists()) {
8-
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
917
}
1018

11-
plugins.each { name, path ->
12-
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13-
include ":$name"
14-
project(":$name").projectDir = pluginDirectory
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21+
id "com.android.application" version "8.7.0" apply false
1522
}
23+
24+
include ":app"

geolocator/example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>8.0</string>
24+
<string>11.0</string>
2525
</dict>
2626
</plist>

geolocator/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
333333
GCC_WARN_UNUSED_FUNCTION = YES;
334334
GCC_WARN_UNUSED_VARIABLE = YES;
335-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
335+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
336336
MTL_ENABLE_DEBUG_INFO = NO;
337337
SDKROOT = iphoneos;
338338
SUPPORTED_PLATFORMS = iphoneos;
@@ -353,6 +353,7 @@
353353
"$(PROJECT_DIR)/Flutter",
354354
);
355355
INFOPLIST_FILE = Runner/Info.plist;
356+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
356357
LD_RUNPATH_SEARCH_PATHS = (
357358
"$(inherited)",
358359
"@executable_path/Frameworks",
@@ -414,7 +415,7 @@
414415
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
415416
GCC_WARN_UNUSED_FUNCTION = YES;
416417
GCC_WARN_UNUSED_VARIABLE = YES;
417-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
418+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
418419
MTL_ENABLE_DEBUG_INFO = YES;
419420
ONLY_ACTIVE_ARCH = YES;
420421
SDKROOT = iphoneos;
@@ -463,7 +464,7 @@
463464
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
464465
GCC_WARN_UNUSED_FUNCTION = YES;
465466
GCC_WARN_UNUSED_VARIABLE = YES;
466-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
467+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
467468
MTL_ENABLE_DEBUG_INFO = NO;
468469
SDKROOT = iphoneos;
469470
SUPPORTED_PLATFORMS = iphoneos;
@@ -485,6 +486,7 @@
485486
"$(PROJECT_DIR)/Flutter",
486487
);
487488
INFOPLIST_FILE = Runner/Info.plist;
489+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
488490
LD_RUNPATH_SEARCH_PATHS = (
489491
"$(inherited)",
490492
"@executable_path/Frameworks",
@@ -511,6 +513,7 @@
511513
"$(PROJECT_DIR)/Flutter",
512514
);
513515
INFOPLIST_FILE = Runner/Info.plist;
516+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
514517
LD_RUNPATH_SEARCH_PATHS = (
515518
"$(inherited)",
516519
"@executable_path/Frameworks",

geolocator/example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void main() {
1717
/// Example [Widget] showing the functionalities of the geolocator plugin
1818
class GeolocatorWidget extends StatefulWidget {
1919
/// Creates a new GeolocatorWidget.
20-
const GeolocatorWidget({Key? key}) : super(key: key);
20+
const GeolocatorWidget({super.key});
2121

2222
/// Utility method to create a page with the Baseflow templating.
2323
static ExamplePage createPage() {

geolocator/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Demonstrates how to use the geolocator plugin.
66
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
77

88
environment:
9-
sdk: ">=2.15.0 <3.0.0"
9+
sdk: ^3.5.0
1010

1111
dependencies:
1212
baseflow_plugin_template: ^2.1.2
@@ -33,7 +33,7 @@ dependencies:
3333
dev_dependencies:
3434
flutter_test:
3535
sdk: flutter
36-
flutter_lints: ^3.0.1
36+
flutter_lints: ^5.0.0
3737

3838
# For information on the generic Dart part of this file, see the
3939
# following page: https://dart.dev/tools/pub/pubspec

geolocator/lib/geolocator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class Geolocator {
211211
/// for approximate location (iOS 14+ only)
212212
///
213213
/// When using this method, the value of the required property `purposeKey`
214-
/// should match the <key> value given in the
214+
/// should match the &lt;key&gt; value given in the
215215
/// `NSLocationTemporaryUsageDescription` dictionary in the
216216
/// Info.plist.
217217
///

geolocator/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: geolocator
22
description: Geolocation plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API for generic location (GPS etc.) functions.
33
repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator
44
issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen
5-
version: 13.0.1
5+
version: 13.0.4
66

77
environment:
8-
sdk: ">=2.15.0 <4.0.0"
8+
sdk: ^3.5.0
99
flutter: ">=2.8.0"
1010

1111
flutter:
@@ -28,13 +28,13 @@ dependencies:
2828

2929
geolocator_platform_interface: ^4.2.3
3030
geolocator_android: ^4.6.0
31-
geolocator_apple: ^2.3.7
31+
geolocator_apple: ^2.3.8
3232
geolocator_web: ^4.1.1
3333
geolocator_windows: ^0.2.3
3434

3535
dev_dependencies:
3636
flutter_test:
3737
sdk: flutter
38-
flutter_lints: ">=3.0.1 <5.0.0"
38+
flutter_lints: ^5.0.0
3939
mockito: ^5.0.0-nullsafety.7
4040
plugin_platform_interface: ^2.1.8

geolocator_android/CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
## NEXT
2+
3+
- Bump `androidx.core:core` to version 1.15.0
4+
5+
## 5.0.1
6+
7+
- Bump `flutter_lints` to version 5.0.0
8+
9+
## 5.0.0
10+
11+
- **BREAKING CHANGE:** for Flutter `3.27.0` and below. Make sure you'll upgrade Flutter to `3.29.0` or above before using this version.
12+
* Fixes deprecation warnings
13+
114
## 4.6.2
215

3-
* Fixes crash when `RuntimeExecutionException` is encountered in `getResult` in `checkLocationSettings`.
16+
* Updates compileSDKVersion to 35
17+
* Updates Fixed warnings in Android package and Android example project
18+
* Updates gradle version
19+
* Updates com.android.application version to 8.7.0
420

521
## 4.6.1
622

geolocator_android/android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99

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

@@ -26,10 +26,10 @@ android {
2626
namespace("com.baseflow.geolocator")
2727
}
2828

29-
compileSdk 34
29+
compileSdk flutter.compileSdkVersion
3030

3131
defaultConfig {
32-
minSdkVersion 16
32+
minSdkVersion flutter.minSdkVersion
3333
}
3434
lintOptions {
3535
disable 'InvalidPackage'
@@ -42,7 +42,7 @@ android {
4242

4343
dependencies {
4444
implementation 'com.google.android.gms:play-services-location:21.2.0'
45-
implementation 'androidx.core:core:1.13.0'
45+
implementation 'androidx.core:core:1.15.0'
4646

4747
testImplementation 'junit:junit:4.13.2'
4848
testImplementation 'org.mockito:mockito-core:5.1.1'

geolocator_android/example/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ android {
3232
compileSdkVersion flutter.compileSdkVersion
3333

3434
compileOptions {
35-
sourceCompatibility JavaVersion.VERSION_1_8
36-
targetCompatibility JavaVersion.VERSION_1_8
35+
sourceCompatibility JavaVersion.VERSION_17
36+
targetCompatibility JavaVersion.VERSION_17
3737
}
3838

3939
lintOptions {

0 commit comments

Comments
 (0)