Skip to content

Commit e7528bb

Browse files
Merge branch 'main' of github.com:Baseflow/flutter-geocoding
2 parents d7f18f5 + 7b9148b commit e7528bb

File tree

25 files changed

+140
-102
lines changed

25 files changed

+140
-102
lines changed

geocoding/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 4.0.0
2+
3+
* **BREAKING CHANGES** Please update to Flutter 3.29+ before updating to this version
4+
* Updates Android CompileSDK to 35
5+
* Migrates example project to applying Gradle plugins with the declarative plugins block
6+
* Updates kotlin version to soon minimal supported Kotlin version `1.8.10`
7+
* Updates Gradle version to `8.11.1`
8+
* Updates iOS Platform version from `11` to `12`
9+
* Updates `geolocator_android` dependency version from `3.x.x` to `4.x.x`
10+
111
## 3.0.1
212

313
- Updated links in README.md to use `https` protocol.

geocoding/example/android/.settings/org.eclipse.buildship.core.prefs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
arguments=
1+
arguments=--init-script /var/folders/j0/68pctv3d20d6m4jzpy06hj200000gn/T/d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script /var/folders/j0/68pctv3d20d6m4jzpy06hj200000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
22
auto.sync=false
33
build.scans.enabled=false
4-
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
4+
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.4.2))
55
connection.project.dir=
66
eclipse.preferences.version=1
77
gradle.user.home=
8-
java.home=/Users/maurits/Library/Java/JavaVirtualMachines/openjdk-14.0.1/Contents/Home
8+
java.home=/opt/homebrew/Cellar/openjdk/23.0.2/libexec/openjdk.jdk/Contents/Home
99
jvm.arguments=
1010
offline.mode=false
1111
override.workspace.settings=true

geocoding/example/android/app/build.gradle

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
17
def localProperties = new Properties()
28
def localPropertiesFile = rootProject.file('local.properties')
39
if (localPropertiesFile.exists()) {
@@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
612
}
713
}
814

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-
1415
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1516
if (flutterVersionCode == null) {
1617
flutterVersionCode = '1'
@@ -21,9 +22,6 @@ if (flutterVersionName == null) {
2122
flutterVersionName = '1.0'
2223
}
2324

24-
apply plugin: 'com.android.application'
25-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26-
2725
android {
2826
namespace "com.baseflow.geocoding_example"
2927
compileSdkVersion flutter.compileSdkVersion

geocoding/example/android/build.gradle

Lines changed: 0 additions & 11 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.3.1'
9-
}
10-
}
11-
121
allprojects {
132
repositories {
143
google()

geocoding/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.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
// Copyright 2014 The Flutter Authors. All rights reserved.
2-
// Use of this source code is governed by a BSD-style license that can be
3-
// found in the LICENSE file.
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+
}()
49

5-
include ':app'
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
611

7-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
8-
def properties = new Properties()
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
918

10-
assert localPropertiesFile.exists()
11-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0" // apply true
21+
id "com.android.application" version "8.10.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
23+
}
1224

13-
def flutterSdkPath = properties.getProperty("flutter.sdk")
14-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
15-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
25+
include ":app"

geocoding/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>11.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

geocoding/example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '11.0'
2+
# platform :ios, '12.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

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

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
97C146EC1CF9000F007C117D /* Resources */,
150150
9705A1C41CF9048500538489 /* Embed Frameworks */,
151151
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
152+
6E29543B2DF0160C3EE45A1B /* [CP] Copy Pods Resources */,
152153
);
153154
buildRules = (
154155
);
@@ -165,7 +166,7 @@
165166
97C146E61CF9000F007C117D /* Project object */ = {
166167
isa = PBXProject;
167168
attributes = {
168-
LastUpgradeCheck = 1430;
169+
LastUpgradeCheck = 1510;
169170
ORGANIZATIONNAME = "";
170171
TargetAttributes = {
171172
97C146ED1CF9000F007C117D = {
@@ -222,6 +223,23 @@
222223
shellPath = /bin/sh;
223224
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
224225
};
226+
6E29543B2DF0160C3EE45A1B /* [CP] Copy Pods Resources */ = {
227+
isa = PBXShellScriptBuildPhase;
228+
buildActionMask = 2147483647;
229+
files = (
230+
);
231+
inputFileListPaths = (
232+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
233+
);
234+
name = "[CP] Copy Pods Resources";
235+
outputFileListPaths = (
236+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
237+
);
238+
runOnlyForDeploymentPostprocessing = 0;
239+
shellPath = /bin/sh;
240+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
241+
showEnvVarsInLog = 0;
242+
};
225243
8DFC6F9C3CE01544A19E06C6 /* [CP] Check Pods Manifest.lock */ = {
226244
isa = PBXShellScriptBuildPhase;
227245
buildActionMask = 2147483647;
@@ -335,7 +353,7 @@
335353
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
336354
GCC_WARN_UNUSED_FUNCTION = YES;
337355
GCC_WARN_UNUSED_VARIABLE = YES;
338-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
356+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
339357
MTL_ENABLE_DEBUG_INFO = NO;
340358
SDKROOT = iphoneos;
341359
SUPPORTED_PLATFORMS = iphoneos;
@@ -417,7 +435,7 @@
417435
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
418436
GCC_WARN_UNUSED_FUNCTION = YES;
419437
GCC_WARN_UNUSED_VARIABLE = YES;
420-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
438+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
421439
MTL_ENABLE_DEBUG_INFO = YES;
422440
ONLY_ACTIVE_ARCH = YES;
423441
SDKROOT = iphoneos;
@@ -466,7 +484,7 @@
466484
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
467485
GCC_WARN_UNUSED_FUNCTION = YES;
468486
GCC_WARN_UNUSED_VARIABLE = YES;
469-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
487+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
470488
MTL_ENABLE_DEBUG_INFO = NO;
471489
SDKROOT = iphoneos;
472490
SUPPORTED_PLATFORMS = iphoneos;

geocoding/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1430"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

geocoding/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: geocoding
22
description: A Flutter Geocoding plugin which provides easy geocoding and reverse-geocoding features.
3-
version: 3.0.1
3+
version: 4.0.0
44
repository: https://github.com/baseflow/flutter-geocoding/tree/main/geocoding
55
issue_tracker: https://github.com/Baseflow/flutter-geocoding/issues
66

@@ -13,7 +13,7 @@ dependencies:
1313
sdk: flutter
1414

1515
geocoding_platform_interface: ^3.0.0
16-
geocoding_android: ^3.0.0
16+
geocoding_android: ^4.0.0
1717
geocoding_ios: ^3.0.0
1818

1919
dev_dependencies:

geocoding_android/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 4.0.0
2+
3+
* **BREAKING CHANGES** Please update to Flutter 3.29+ before updating to this version
4+
* Updates Android CompileSDK to 35
5+
* Migrates example project to applying Gradle plugins with the declarative plugins block
6+
* Updates kotlin version to soon minimal supported Kotlin version `1.8.10`
7+
* Updates Gradle version to `8.11.1`
8+
19
## 3.3.1
210

311
* Removes deprecated support for Android V1 embedding as support will be removed from Flutter (see [flutter/flutter#144726](https://github.com/flutter/flutter/pull/144726)).

geocoding_android/android/build.gradle

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
group 'com.baseflow.geocoding'
22
version '1.0'
33

4-
buildscript {
5-
repositories {
6-
google()
7-
mavenCentral()
8-
}
9-
10-
dependencies {
11-
classpath 'com.android.tools.build:gradle:7.3.1'
12-
}
13-
}
14-
154
rootProject.allprojects {
165
repositories {
176
google()
@@ -26,7 +15,7 @@ android {
2615
namespace("com.baseflow.geocoding")
2716
}
2817

29-
compileSdk 33
18+
compileSdk 35
3019

3120
compileOptions {
3221
sourceCompatibility JavaVersion.VERSION_1_8
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Jan 30 14:47:38 CET 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

geocoding_android/example/android/app/build.gradle

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
17
def localProperties = new Properties()
28
def localPropertiesFile = rootProject.file('local.properties')
39
if (localPropertiesFile.exists()) {
@@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
612
}
713
}
814

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-
1415
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1516
if (flutterVersionCode == null) {
1617
flutterVersionCode = '1'
@@ -21,10 +22,6 @@ if (flutterVersionName == null) {
2122
flutterVersionName = '1.0'
2223
}
2324

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
2825
android {
2926
namespace "com.baseflow.geocoding_example"
3027
compileSdkVersion flutter.compileSdkVersion

geocoding_android/example/android/build.gradle

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
buildscript {
2-
ext.kotlin_version = '1.8.0'
3-
repositories {
4-
google()
5-
mavenCentral()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.3.1'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
}
12-
}
13-
141
allprojects {
152
repositories {
163
google()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Mon Jun 26 13:12:11 AEST 2023
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists
Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
// Copyright 2014 The Flutter Authors. All rights reserved.
2-
// Use of this source code is governed by a BSD-style license that can be
3-
// found in the LICENSE file.
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+
}()
49

5-
include ':app'
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
611

7-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
8-
def properties = new Properties()
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
918

10-
assert localPropertiesFile.exists()
11-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0" // apply true
21+
id "com.android.application" version "8.10.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
23+
}
1224

13-
def flutterSdkPath = properties.getProperty("flutter.sdk")
14-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
15-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
25+
include ":app"

geocoding_android/example/lib/main.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,21 @@ class BaseflowPluginExample extends StatelessWidget {
6868
static MaterialColor createMaterialColor(Color color) {
6969
final strengths = <double>[.05];
7070
final swatch = <int, Color>{};
71-
final r = color.red, g = color.green, b = color.blue;
71+
final r = color.r, g = color.g, b = color.b;
7272

7373
for (var i = 1; i < 10; i++) {
7474
strengths.add(0.1 * i);
7575
}
7676
for (var strength in strengths) {
7777
final ds = 0.5 - strength;
7878
swatch[(strength * 1000).round()] = Color.fromRGBO(
79-
r + ((ds < 0 ? r : (255 - r)) * ds).round(),
80-
g + ((ds < 0 ? g : (255 - g)) * ds).round(),
81-
b + ((ds < 0 ? b : (255 - b)) * ds).round(),
79+
(r + ((ds < 0 ? r : (1.0 - r)) * ds) * 255).round(),
80+
(g + ((ds < 0 ? g : (1.0 - g)) * ds) * 255).round(),
81+
(b + ((ds < 0 ? b : (1.0 - b)) * ds) * 255).round(),
8282
1,
8383
);
8484
}
85-
return MaterialColor(color.value, swatch);
85+
return MaterialColor(color.toARGB32(), swatch);
8686
}
8787
}
8888

0 commit comments

Comments
 (0)