Skip to content

Commit 32f3447

Browse files
Merge pull request #82 from icapps/feature/update-gradle-and-kotlin
Updated gradle versions
2 parents 1d580c3 + c37c62d commit 32f3447

62 files changed

Lines changed: 706 additions & 340 deletions

Some content is hidden

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

.fvmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"flutter": "3.27.3"
3+
}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,6 @@ test/coverage_helper_test.dart
9191
**_testImage.png
9292

9393
# Fvm
94-
.fvm/flutter_sdk
94+
95+
# FVM Version Cache
96+
.fvm/

.vscode/launch.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "flutter-background-location-tracker",
9+
"request": "launch",
10+
"type": "dart"
11+
},
12+
{
13+
"name": "example",
14+
"cwd": "example",
15+
"request": "launch",
16+
"type": "dart"
17+
},
18+
{
19+
"name": "example (release mode)",
20+
"cwd": "example",
21+
"request": "launch",
22+
"type": "dart",
23+
"flutterMode": "release"
24+
}
25+
]
26+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"dart.flutterSdkPath": ".fvm/versions/3.27.3"
3+
}

CHANGELOG.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
## 1.4.3 - 28-03-2024
1+
## 1.5.0 - 2025-01-27
2+
- Updated gradle dependencies
3+
4+
## 1.4.3 - 2024-03-28
25
- Updated targetSdkVersion to 34 and added FOREGROUND_SERVICE_LOCATION for support Android 14
36
- Removed unrecognized_error_code from analysis_options.yaml
47

5-
## 1.4.2 - 11-09-2023
8+
## 1.4.2 - 2023-09-11
69
- Added fromJson/toJson/toString/equals/copyWith methods in BackgroundLocationUpdateData
710

8-
## 1.4.1 - 17-06-2023
11+
## 1.4.1 - 2023-06-17
912
- Updates Play Services Location library
1013

11-
## 1.4.0 - 11-01-2023
14+
## 1.4.0 - 2023-01-11
1215
- Added extra fields. (-1 if not supported or not available)
1316
- horizontalAccuracy
1417
- alt
@@ -18,35 +21,35 @@
1821
- speed
1922
- speedAccuracy (Android > O)
2023

21-
## 1.3.1 - 14-12-2022
24+
## 1.3.1 - 2022-12-14
2225
- Fix crash with starting service in background
2326

24-
## 1.3.0 - 12-09-2022
27+
## 1.3.0 - 2022-09-12
2528
- Added support for android sdk 33
2629
- Updated dependencies
2730
- Updated kotlin
2831
- Fixed the breaking changes on the native android side
2932
- Updated the example project to save the background locations to shared prefs
3033
- Updated the example project & readme to use the `@pragma('vm:entry-point')` annotation
3134

32-
## 1.2.0 - 15-11-2021
35+
## 1.2.0 - 2021-11-15
3336
- Added iOS specific options to restart the tracking after killing the app
3437
- Added option to Android specific options to only get updates every x meters
3538

36-
## 1.1.0 - 14-10-2021
39+
## 1.1.0 - 2021-10-14
3740
#Added
3841
- Added more options to android config to specify update interval
3942
- Added iOS specific options to control activity type and/or distance filter
4043

41-
## 1.0.2 - 22-06-2021
44+
## 1.0.2 - 2021-06-22
4245
#Fixed
4346
- Formatting
4447

45-
## 1.0.1 - 22-06-2021
48+
## 1.0.1 - 2021-06-22
4649
#Added
4750
- Pub.dev badge
4851

49-
## 1.0.0 - 22-06-2021
52+
## 1.0.0 - 2021-06-22
5053
Initial release
5154
- Background location tracking
5255
- Nullsafety

analysis_options.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ linter:
5656
- file_names
5757
- hash_and_equals
5858
- implementation_imports
59-
- invariant_booleans
6059
- collection_methods_unrelated_type
6160
- join_return_with_assignment
6261
- library_names
@@ -83,7 +82,6 @@ linter:
8382
- prefer_const_literals_to_create_immutables
8483
- prefer_constructors_over_static_methods
8584
- prefer_contains
86-
- prefer_equal_for_default_values
8785
- prefer_final_fields
8886
- prefer_final_in_for_each
8987
- prefer_final_locals

android/build.gradle

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.3.1'
12+
classpath 'com.android.tools.build:gradle:8.3.2'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}
@@ -27,11 +27,22 @@ apply plugin: 'kotlin-android'
2727
android {
2828
compileSdkVersion 34
2929

30+
namespace 'com.icapps.background_location_tracker'
31+
32+
compileOptions {
33+
sourceCompatibility = JavaVersion.VERSION_17
34+
targetCompatibility = JavaVersion.VERSION_17
35+
}
36+
37+
kotlinOptions {
38+
jvmTarget = JavaVersion.VERSION_17
39+
}
40+
3041
sourceSets {
3142
main.java.srcDirs += 'src/main/kotlin'
3243
}
3344
defaultConfig {
34-
minSdkVersion 16
45+
minSdkVersion 19
3546
targetSdkVersion 34
3647
}
3748
lintOptions {

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
36
zipStoreBase=GRADLE_USER_HOME
47
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

android/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
66
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
77
<uses-permission android:name="android.permission.WAKE_LOCK" />
8+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
89
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
910

1011
<application>

android/src/main/kotlin/com/icapps/background_location_tracker/utils/NotificationUtil.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ internal object NotificationUtil {
5959
val clickPendingIntent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
6060
PendingIntent.getActivity(context, 0, context.packageManager.getLaunchIntentForPackage(context.packageName), PendingIntent.FLAG_IMMUTABLE)
6161
} else {
62+
@Suppress("UnspecifiedImmutableFlag")
6263
PendingIntent.getActivity(context, 0, context.packageManager.getLaunchIntentForPackage(context.packageName), 0)
6364
}
6465

0 commit comments

Comments
 (0)