Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
* Fixed compatibility with Android Gradle Plugin 8.0+
* Added namespace to Android build.gradle
* Fixed JVM target compatibility between Java and Kotlin
* Updated Gradle and Kotlin dependencies for better compatibility
* Updated to target Android SDK 33
* Removed namespace declaration from Android Manifest

## 2.0.6
* Fixing iOS build
* Fixing memory leak on Android
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ This package is a V2 of the background_locator package, fixing it and making it

A Flutter plugin for getting location updates even when the app is killed.

## Fork Information

This is a fork of the original background_locator_2 plugin with the following improvements:

- Added compatibility with Android Gradle Plugin 8.0+
- Fixed JVM target compatibility issues
- Updated Gradle and Kotlin dependencies
- Added proper namespace to Android build.gradle

## Usage with this fork

To use this fork in your Flutter project, add the following to your `pubspec.yaml`:

```yaml
dependencies:
background_locator_2:
git:
url: https://github.com/sultan18kh/background_locator_2_gradle_migration.git
ref: fix/gradle-compatibility
```

![demo](https://raw.githubusercontent.com/RomanJos/background_locator/master/demo.gif)

Refer to [wiki](https://github.com/Yukams/background_locator_fixed/wiki) page for install and setup instruction or jump to specific subject with below links:
Expand All @@ -28,3 +49,4 @@ Thanks to all who contributed on this plugin to fix bugs and adding new feature,
* [Gerardo Ibarra](https://github.com/gpibarra)
* [RomanJos](https://github.com/RomanJos)
* [Marcelo Henrique Neppel](https://github.com/marceloneppel)
* [Sultan Khan](https://github.com/sultan18kh) (creator of fork)
13 changes: 12 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -25,6 +26,8 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
namespace 'yukams.app.background_locator_2'

compileSdkVersion 29

sourceSets {
Expand All @@ -37,6 +40,14 @@ android {
lintOptions {
disable 'InvalidPackage'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="yukams.app.background_locator_2"></manifest>
<manifest></manifest>
7 changes: 4 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: background_locator_2
description: A Flutter plugin to request the location even if the app is killed. Sending the location to a dart function in background, also provide a meter filter
version: 2.0.6
homepage: https://github.com/Yukams/background_locator_fixed
issue_tracker: https://github.com/Yukams/background_locator_fixed/issues
version: 2.0.7
homepage: https://github.com/sultan18kh/background_locator_2_gradle_migration
repository: https://github.com/sultan18kh/background_locator_2_gradle_migration
issue_tracker: https://github.com/Yukams/background_locator_2_gradle_migration/issues
platforms:
android:
ios:
Expand Down