From 1f7e32852916d5367a8a0e3d0af8f77b455d1320 Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Thu, 23 Jan 2025 17:48:43 +0100 Subject: [PATCH] periodical cleanup (#952) --- .github/workflows/location-prepare.yaml | 6 +-- packages/location/android/build.gradle | 39 +++++++++++-------- .../location/example/android/app/build.gradle | 38 ++++++------------ .../location/example/android/build.gradle | 9 +---- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../location/example/android/settings.gradle | 8 ++-- .../ios/Flutter/AppFrameworkInfo.plist | 2 +- packages/location/example/ios/Podfile | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../example/ios/Runner/AppDelegate.swift | 2 +- packages/location/example/pubspec.yaml | 8 ++-- packages/location/pubspec.yaml | 10 ++--- .../location_platform_interface/CHANGELOG.md | 14 +++++-- .../lib/src/method_channel_location.dart | 2 + .../location_platform_interface/pubspec.yaml | 12 +++--- packages/location_web/CHANGELOG.md | 5 +++ packages/location_web/pubspec.yaml | 12 +++--- 18 files changed, 87 insertions(+), 88 deletions(-) diff --git a/.github/workflows/location-prepare.yaml b/.github/workflows/location-prepare.yaml index 0a773b59..39f93a1c 100644 --- a/.github/workflows/location-prepare.yaml +++ b/.github/workflows/location-prepare.yaml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - flutter-version: ["3.22.x"] + flutter-version: ["3.27.x"] steps: - name: Clone repository @@ -53,7 +53,7 @@ jobs: - name: Set up Flutter uses: subosito/flutter-action@v2 with: - flutter-version: 3.22.x + flutter-version: 3.27.x - name: Set up Java uses: actions/setup-java@v4 @@ -80,7 +80,7 @@ jobs: - name: Set up Flutter uses: subosito/flutter-action@v2 with: - flutter-version: 3.22.x + flutter-version: 3.27.x - name: Install tools run: brew install clang-format diff --git a/packages/location/android/build.gradle b/packages/location/android/build.gradle index a67a2d65..88633346 100644 --- a/packages/location/android/build.gradle +++ b/packages/location/android/build.gradle @@ -9,9 +9,9 @@ buildscript { } dependencies { - classpath "com.android.tools.build:gradle:8.3.1" - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23" - classpath "org.jlleitschuh.gradle:ktlint-gradle:11.5.0" + classpath("com.android.tools.build:gradle:8.8.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0") + classpath("org.jlleitschuh.gradle:ktlint-gradle:11.5.0") } } @@ -21,31 +21,36 @@ repositories { } apply plugin: "com.android.library" -apply plugin: "kotlin-android" +apply plugin: "org.jetbrains.kotlin.android" apply plugin: "org.jlleitschuh.gradle.ktlint" android { namespace = "com.lyokone.location" - compileSdk = 34 - - defaultConfig { - minSdk = 21 - } + compileSdk = 35 compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = "1.8" - allWarningsAsErrors = true + jvmTarget = "11" + // allWarningsAsErrors = true // TODO(bartekpacia): Re-enable + } + + sourceSets { + main.java.srcDirs += "src/main/kotlin" + test.java.srcDirs += "src/test/kotlin" + } + + defaultConfig { + minSdk = 21 + targetSdk = 35 } } dependencies { - compileOnly "androidx.annotation:annotation:1.6.0" - - api "com.google.android.gms:play-services-location:21.2.0" - implementation "androidx.core:core-ktx:1.10.1" + compileOnly("androidx.annotation:annotation:1.6.0") + implementation("androidx.core:core-ktx:1.13.1") + api("com.google.android.gms:play-services-location:21.3.0") } diff --git a/packages/location/example/android/app/build.gradle b/packages/location/example/android/app/build.gradle index d8987eff..a7c02d45 100644 --- a/packages/location/example/android/app/build.gradle +++ b/packages/location/example/android/app/build.gradle @@ -1,42 +1,28 @@ plugins { id "com.android.application" - id "dev.flutter.flutter-gradle-plugin" id "org.jetbrains.kotlin.android" -} - -def localProperties = new Properties() -def localPropertiesFile = rootProject.file("local.properties") -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader("UTF-8") { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty("flutter.versionCode") -if (flutterVersionCode == null) { - flutterVersionCode = "1" -} - -def flutterVersionName = localProperties.getProperty("flutter.versionName") -if (flutterVersionName == null) { - flutterVersionName = "1.0" + id "dev.flutter.flutter-gradle-plugin" } android { - compileSdk = 34 + compileSdk = flutter.compileSdkVersion namespace = "com.lyokone.location.example" defaultConfig { applicationId = "com.lyokone.location.example" - minSdk = 21 - targetSdk = 34 - versionCode = flutterVersionCode.toInteger() - versionName = flutterVersionName + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = "11" } buildTypes { diff --git a/packages/location/example/android/build.gradle b/packages/location/example/android/build.gradle index ebc70451..fd716da1 100644 --- a/packages/location/example/android/build.gradle +++ b/packages/location/example/android/build.gradle @@ -1,13 +1,8 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { project.evaluationDependsOn(":app") } diff --git a/packages/location/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/location/example/android/gradle/wrapper/gradle-wrapper.properties index 7aeeb11c..1126aa09 100644 --- a/packages/location/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/location/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip diff --git a/packages/location/example/android/settings.gradle b/packages/location/example/android/settings.gradle index 82f7f6e9..f9940766 100644 --- a/packages/location/example/android/settings.gradle +++ b/packages/location/example/android/settings.gradle @@ -17,9 +17,9 @@ pluginManagement { } plugins { - id "dev.flutter.flutter-plugin-loader" - id "com.android.application" version "8.3.1" apply false - id "org.jetbrains.kotlin.android" version "1.9.23" apply false + id("dev.flutter.flutter-plugin-loader") + id("com.android.application") version("8.8.0") apply false + id("org.jetbrains.kotlin.android") version("2.1.0") apply false } -include ":app" +include(":app") diff --git a/packages/location/example/ios/Flutter/AppFrameworkInfo.plist b/packages/location/example/ios/Flutter/AppFrameworkInfo.plist index 4f8d4d24..8c6e5614 100644 --- a/packages/location/example/ios/Flutter/AppFrameworkInfo.plist +++ b/packages/location/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/packages/location/example/ios/Podfile b/packages/location/example/ios/Podfile index 88359b22..279576f3 100644 --- a/packages/location/example/ios/Podfile +++ b/packages/location/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/packages/location/example/ios/Runner.xcodeproj/project.pbxproj b/packages/location/example/ios/Runner.xcodeproj/project.pbxproj index e503d3c9..3e6b7d42 100644 --- a/packages/location/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/location/example/ios/Runner.xcodeproj/project.pbxproj @@ -163,7 +163,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { diff --git a/packages/location/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/location/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a3..5e31d3d3 100644 --- a/packages/location/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/location/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ =3.1.0 <4.0.0" - flutter: ">=3.16.0" + sdk: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" dependencies: flutter: sdk: flutter location: path: ../ - url_launcher: ^6.2.5 + url_launcher: ^6.3.1 dev_dependencies: - leancode_lint: ^3.0.0 + leancode_lint: ^15.0.0 flutter: uses-material-design: true diff --git a/packages/location/pubspec.yaml b/packages/location/pubspec.yaml index 2ceb68a1..6c6d7a25 100644 --- a/packages/location/pubspec.yaml +++ b/packages/location/pubspec.yaml @@ -6,8 +6,8 @@ repository: https://github.com/Lyokone/flutterlocation issue_tracker: https://github.com/Lyokone/flutterlocation/issues environment: - sdk: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + sdk: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" flutter: plugin: @@ -29,8 +29,8 @@ dependencies: location_web: ^5.0.4 dev_dependencies: async: ^2.11.0 - build_runner: ^2.4.11 + build_runner: ^2.4.14 flutter_test: sdk: flutter - leancode_lint: ^13.0.0 - mockito: ^5.4.4 + leancode_lint: ^15.0.0 + mockito: ^5.4.5 diff --git a/packages/location_platform_interface/CHANGELOG.md b/packages/location_platform_interface/CHANGELOG.md index 47d28ee7..c9a2247f 100644 --- a/packages/location_platform_interface/CHANGELOG.md +++ b/packages/location_platform_interface/CHANGELOG.md @@ -1,12 +1,18 @@ +## 6.0.0 + +- Bump dependencies (#952) + - Bump minimum Dart version to 3.6, minimum Flutter version to 3.27 + ## 5.0.0 -- Bump minimum Dart version to 3.4, minimum Flutter version to 3.22 -- Bump dependencies +- Bump dependencies (#964) + - Bump minimum Dart version to 3.4, minimum Flutter version to 3.22 ## 4.0.0 -- Bump minimum Dart version to 3.1, minimum Flutter version to 3.16 -- Bump dependencies +- Bump dependencies (#937) + - Bump minimum Dart version to 3.1, minimum Flutter version to 3.16 + ## 3.1.2 diff --git a/packages/location_platform_interface/lib/src/method_channel_location.dart b/packages/location_platform_interface/lib/src/method_channel_location.dart index bb1ee650..3b6726fa 100644 --- a/packages/location_platform_interface/lib/src/method_channel_location.dart +++ b/packages/location_platform_interface/lib/src/method_channel_location.dart @@ -205,6 +205,8 @@ class MethodChannelLocation extends LocationPlatform { } if (color != null) { + // Not sure what to replace this with. + // ignore: deprecated_member_use data['color'] = '#${color.value.toRadixString(16)}'; } diff --git a/packages/location_platform_interface/pubspec.yaml b/packages/location_platform_interface/pubspec.yaml index 00a82c13..21e8fd62 100644 --- a/packages/location_platform_interface/pubspec.yaml +++ b/packages/location_platform_interface/pubspec.yaml @@ -1,11 +1,11 @@ name: location_platform_interface description: A common platform interface for the location plugin. -version: 5.0.0 +version: 6.0.0 homepage: https://github.com/Lyokone/flutterlocation environment: - sdk: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + sdk: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" dependencies: flutter: @@ -14,8 +14,8 @@ dependencies: dev_dependencies: async: ^2.11.0 - build_runner: ^2.4.11 + build_runner: ^2.4.14 flutter_test: sdk: flutter - leancode_lint: ^13.0.0 - mockito: ^5.4.4 + leancode_lint: ^15.0.0 + mockito: ^5.4.5 diff --git a/packages/location_web/CHANGELOG.md b/packages/location_web/CHANGELOG.md index 9a4bd06c..9119ee49 100644 --- a/packages/location_web/CHANGELOG.md +++ b/packages/location_web/CHANGELOG.md @@ -1,3 +1,8 @@ +## 6.0.0 + +- Bump minimum Dart version to 3.6, minimum Flutter version to 3.27 (#952) +- Bump dependency on `package: web` to `^1.1.0` + ## 5.0.5 - Remove dependency on `js` diff --git a/packages/location_web/pubspec.yaml b/packages/location_web/pubspec.yaml index 5c6f732f..bc974373 100644 --- a/packages/location_web/pubspec.yaml +++ b/packages/location_web/pubspec.yaml @@ -1,27 +1,27 @@ name: location_web description: The web implementation of the location plugin. -version: 5.0.5 +version: 6.0.0 homepage: https://github.com/Lyokone/flutterlocation repository: https://github.com/Lyokone/flutterlocation issue_tracker: https://github.com/Lyokone/flutterlocation/issues environment: - sdk: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + sdk: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" dependencies: flutter: sdk: flutter flutter_web_plugins: sdk: flutter - http_parser: ^4.0.0 + http_parser: ^4.1.0 location_platform_interface: ^5.0.0 - web: ^1.0.0 + web: ^1.1.0 dev_dependencies: flutter_test: sdk: flutter - mockito: ^5.4.4 + mockito: ^5.4.5 flutter: plugin: