From 573bb96f2b0bea185efdd6f2002b44e90eacec66 Mon Sep 17 00:00:00 2001 From: Yoshi Date: Wed, 9 Oct 2024 22:40:46 +0300 Subject: [PATCH 1/2] issue #52 --- android/app/build.gradle | 7 +++++++ pubspec.lock | 20 ++++++++++---------- pubspec.yaml | 10 +++++----- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index acbf743..08bfbe8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -42,6 +42,13 @@ android { jvmTarget = JavaVersion.VERSION_17 } + dependenciesInfo { + // Disables dependency metadata when building APKs. + includeInApk = false + // Disables dependency metadata when building Android App Bundles. + includeInBundle = false + } + defaultConfig { applicationId = "com.yoshi.todark" minSdk = 23 diff --git a/pubspec.lock b/pubspec.lock index 2f7358c..fc8d54f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -242,10 +242,10 @@ packages: dependency: "direct main" description: name: device_info_plus - sha256: a7fd703482b391a87d60b6061d04dfdeab07826b96f9abd8f5ed98068acc0074 + sha256: db03b2d2a3fa466a4627709e1db58692c3f7f658e36a5942d342d86efedc4091 url: "https://pub.dev" source: hosted - version: "10.1.2" + version: "11.0.0" device_info_plus_platform_interface: dependency: transitive description: @@ -290,10 +290,10 @@ packages: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" file_selector: dependency: "direct main" description: @@ -758,10 +758,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 + sha256: "894f37107424311bdae3e476552229476777b8752c5a2a2369c0cb9a2d5442ef" url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "8.0.3" package_info_plus_platform_interface: dependency: transitive description: @@ -790,10 +790,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: f7544c346a0742aee1450f9e5c0f5269d7c602b9c95fdbcd9fb8f5b1df13b1cc + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a url: "https://pub.dev" source: hosted - version: "2.2.11" + version: "2.2.12" path_provider_foundation: dependency: transitive description: @@ -1059,10 +1059,10 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.1" url_launcher_android: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 921f034..9d6829f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,9 +1,9 @@ name: todark -description: Task management application +description: Task management application. publish_to: "none" -version: 1.5.3+43 +version: 1.5.4+44 environment: sdk: ">=3.5.3 <4.0.0" @@ -22,7 +22,7 @@ dependencies: # home_widget: ^0.6.0 restart_app: ^1.3.2 google_fonts: ^6.2.1 - url_launcher: ^6.3.0 + url_launcher: ^6.3.1 iconsax_plus: ^1.0.0 time_machine: ^0.9.17 dynamic_color: ^1.7.0 @@ -30,8 +30,8 @@ dependencies: file_selector: ^1.0.3 table_calendar: ^3.1.2 flutter_timezone: ^3.0.1 - device_info_plus: ^10.1.2 - package_info_plus: ^8.0.2 + device_info_plus: ^11.0.0 + package_info_plus: ^8.0.3 flex_color_picker: ^3.6.0 flutter_easyloading: ^3.0.5 flutter_displaymode: ^0.6.0 From 56f0eef6b38729b370de8734c81e1272ec270f55 Mon Sep 17 00:00:00 2001 From: Yoshi Date: Sat, 12 Oct 2024 17:51:04 +0300 Subject: [PATCH 2/2] Fix notifications --- android/app/build.gradle | 30 +++++-------------- .../gradle/wrapper/gradle-wrapper.properties | 3 +- android/settings.gradle | 4 +-- lib/main.dart | 7 +++-- pubspec.yaml | 3 +- 5 files changed, 18 insertions(+), 29 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 08bfbe8..45d6385 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -4,24 +4,6 @@ plugins { id "dev.flutter.flutter-gradle-plugin" } -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' -} - def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { @@ -34,12 +16,16 @@ android { ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_17 + jvmTarget = "1.8" + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' } dependenciesInfo { @@ -79,7 +65,7 @@ android { } flutter { - source = '../..' + source = "../.." } dependencies { diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 7bb2df6..c5f51a8 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Sat Oct 12 17:12:07 MSK 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index b9e43bd..bd016dc 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -18,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false + id "com.android.application" version "7.3.1" apply false + id "org.jetbrains.kotlin.android" version "2.0.0" apply false } include ":app" diff --git a/lib/main.dart b/lib/main.dart index d2edcbd..c0829d2 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -71,9 +71,10 @@ void main() async { const LinuxInitializationSettings initializationSettingsLinux = LinuxInitializationSettings(defaultActionName: 'ToDark'); const InitializationSettings initializationSettings = InitializationSettings( - android: initializationSettingsAndroid, - linux: initializationSettingsLinux, - iOS: initializationSettingsIos); + android: initializationSettingsAndroid, + linux: initializationSettingsLinux, + iOS: initializationSettingsIos, + ); await flutterLocalNotificationsPlugin.initialize(initializationSettings); await IsarController().openDB(); await initSettings(); diff --git a/pubspec.yaml b/pubspec.yaml index 9d6829f..a12e5cf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,7 +19,8 @@ dependencies: intl: ^0.19.0 timezone: ^0.9.4 # workmanager: ^0.5.2 - # home_widget: ^0.6.0 + # home_widget: ^0.7.0 + # quick_actions: ^1.0.8 restart_app: ^1.3.2 google_fonts: ^6.2.1 url_launcher: ^6.3.1