Skip to content

Commit

Permalink
Fix notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonavichus committed Oct 12, 2024
1 parent 573bb96 commit 56f0eef
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 29 deletions.
30 changes: 8 additions & 22 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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 {
Expand Down Expand Up @@ -79,7 +65,7 @@ android {
}

flutter {
source = '../..'
source = "../.."
}

dependencies {
Expand Down
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
7 changes: 4 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56f0eef

Please sign in to comment.