Skip to content

Commit 7c9bcbe

Browse files
committed
Modernize
1 parent 1f52f6d commit 7c9bcbe

File tree

12 files changed

+164
-138
lines changed

12 files changed

+164
-138
lines changed

.claude/settings.local.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"mcp__kagi__kagi_search_fetch"
5+
]
6+
}
7+
}

android/app/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import java.io.FileInputStream
33

44
plugins {
55
id("com.android.application")
6-
id("kotlin-android")
6+
id("org.jetbrains.kotlin.android")
77
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
88
id("dev.flutter.flutter-gradle-plugin")
99
}
@@ -20,11 +20,11 @@ android {
2020
ndkVersion = "27.0.12077973"
2121

2222
compileOptions {
23-
sourceCompatibility = JavaVersion.VERSION_11
24-
targetCompatibility = JavaVersion.VERSION_11
23+
sourceCompatibility = JavaVersion.VERSION_17
24+
targetCompatibility = JavaVersion.VERSION_17
2525
}
2626

27-
kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() }
27+
kotlin { compilerOptions { jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } }
2828

2929
defaultConfig {
3030
applicationId = "io.kbl.superduper"

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip

android/settings.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
21-
id("com.android.application") version "8.7.0" apply false
22-
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
21+
id("com.android.application") version "8.11.0" apply false
22+
id("org.jetbrains.kotlin.android") version "2.3.0" apply false
2323
}
2424

2525
include(":app")

ios/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '13.0'
1+
# Define global platform for your project
2+
platform :ios, '15.6'
33

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

ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ SPEC CHECKSUMS:
2323
flutter_foreground_task: a159d2c2173b33699ddb3e6c2a067045d7cebb89
2424
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
2525

26-
PODFILE CHECKSUM: 0dbd5a87e0ace00c9610d2037ac22083a01f861d
26+
PODFILE CHECKSUM: 51524a23a0f5fc653d722d36c6c0fb1d7c9d818a
2727

2828
COCOAPODS: 1.16.2

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
buildSettings = {
338338
ALWAYS_SEARCH_USER_PATHS = NO;
339339
CLANG_ANALYZER_NONNULL = YES;
340-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
340+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
341341
CLANG_CXX_LIBRARY = "libc++";
342342
CLANG_ENABLE_MODULES = YES;
343343
CLANG_ENABLE_OBJC_ARC = YES;
@@ -367,15 +367,15 @@
367367
ENABLE_NS_ASSERTIONS = NO;
368368
ENABLE_STRICT_OBJC_MSGSEND = YES;
369369
ENABLE_USER_SCRIPT_SANDBOXING = NO;
370-
GCC_C_LANGUAGE_STANDARD = gnu99;
370+
GCC_C_LANGUAGE_STANDARD = gnu11;
371371
GCC_NO_COMMON_BLOCKS = YES;
372372
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
373373
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
374374
GCC_WARN_UNDECLARED_SELECTOR = YES;
375375
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
376376
GCC_WARN_UNUSED_FUNCTION = YES;
377377
GCC_WARN_UNUSED_VARIABLE = YES;
378-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
378+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
379379
MTL_ENABLE_DEBUG_INFO = NO;
380380
SDKROOT = iphoneos;
381381
SUPPORTED_PLATFORMS = iphoneos;
@@ -419,7 +419,7 @@
419419
buildSettings = {
420420
ALWAYS_SEARCH_USER_PATHS = NO;
421421
CLANG_ANALYZER_NONNULL = YES;
422-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
422+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
423423
CLANG_CXX_LIBRARY = "libc++";
424424
CLANG_ENABLE_MODULES = YES;
425425
CLANG_ENABLE_OBJC_ARC = YES;
@@ -449,7 +449,7 @@
449449
ENABLE_STRICT_OBJC_MSGSEND = YES;
450450
ENABLE_TESTABILITY = YES;
451451
ENABLE_USER_SCRIPT_SANDBOXING = NO;
452-
GCC_C_LANGUAGE_STANDARD = gnu99;
452+
GCC_C_LANGUAGE_STANDARD = gnu11;
453453
GCC_DYNAMIC_NO_PIC = NO;
454454
GCC_NO_COMMON_BLOCKS = YES;
455455
GCC_OPTIMIZATION_LEVEL = 0;
@@ -463,7 +463,7 @@
463463
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
464464
GCC_WARN_UNUSED_FUNCTION = YES;
465465
GCC_WARN_UNUSED_VARIABLE = YES;
466-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
466+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
467467
MTL_ENABLE_DEBUG_INFO = YES;
468468
ONLY_ACTIVE_ARCH = YES;
469469
SDKROOT = iphoneos;
@@ -476,7 +476,7 @@
476476
buildSettings = {
477477
ALWAYS_SEARCH_USER_PATHS = NO;
478478
CLANG_ANALYZER_NONNULL = YES;
479-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
479+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
480480
CLANG_CXX_LIBRARY = "libc++";
481481
CLANG_ENABLE_MODULES = YES;
482482
CLANG_ENABLE_OBJC_ARC = YES;
@@ -506,15 +506,15 @@
506506
ENABLE_NS_ASSERTIONS = NO;
507507
ENABLE_STRICT_OBJC_MSGSEND = YES;
508508
ENABLE_USER_SCRIPT_SANDBOXING = NO;
509-
GCC_C_LANGUAGE_STANDARD = gnu99;
509+
GCC_C_LANGUAGE_STANDARD = gnu11;
510510
GCC_NO_COMMON_BLOCKS = YES;
511511
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
512512
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
513513
GCC_WARN_UNDECLARED_SELECTOR = YES;
514514
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
515515
GCC_WARN_UNUSED_FUNCTION = YES;
516516
GCC_WARN_UNUSED_VARIABLE = YES;
517-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
517+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
518518
MTL_ENABLE_DEBUG_INFO = NO;
519519
SDKROOT = iphoneos;
520520
SUPPORTED_PLATFORMS = iphoneos;

lib/repository.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class ConnectionHandler extends _$ConnectionHandler {
7979
Future<void> connect() async {
8080
log.d(SDLogger.bluetooth, "Connecting to ${_device.remoteId}");
8181
if (_device.isConnected) {
82+
if (!ref.mounted) return;
8283
state = SDBluetoothConnectionState.connected;
8384
return;
8485
}
@@ -87,17 +88,21 @@ class ConnectionHandler extends _$ConnectionHandler {
8788

8889
try {
8990
await _device.connect(mtu: null, license: License.free);
91+
if (!ref.mounted) return;
9092
await _device.connectionState
9193
.where((val) => val == BluetoothConnectionState.connected)
9294
.first;
95+
if (!ref.mounted) return;
9396
if (Platform.isAndroid) {
9497
await _device.requestMtu(512);
98+
if (!ref.mounted) return;
9599
}
96100
log.i(SDLogger.bluetooth, 'Connected to ${_device.remoteId.str}');
97101
state = SDBluetoothConnectionState.connected;
98102
await _device.discoverServices();
99103
} catch (e) {
100104
log.e(SDLogger.bluetooth, 'Error connecting', e);
105+
if (!ref.mounted) return;
101106
state = SDBluetoothConnectionState.disconnected;
102107
}
103108
}

lib/repository.g.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ import Foundation
77

88
import device_info_plus
99
import flutter_blue_plus_darwin
10-
import path_provider_foundation
1110
import shared_preferences_foundation
1211
import url_launcher_macos
1312

1413
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
1514
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
1615
FlutterBluePlusPlugin.register(with: registry.registrar(forPlugin: "FlutterBluePlusPlugin"))
17-
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
1816
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
1917
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
2018
}

0 commit comments

Comments
 (0)