From 1db016235cf7448980b1922d34db00de12c079f2 Mon Sep 17 00:00:00 2001 From: Alex Babich Date: Mon, 1 Jul 2024 10:42:38 +0300 Subject: [PATCH 1/3] - Added namespace --- android/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index 8ad2194..5224ca6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -28,6 +28,11 @@ apply plugin: 'kotlin-android' android { compileSdkVersion 33 + if (project.android.hasProperty('namespace')) { + namespace 'io.alexrintt.sharedstorage' + } + + sourceSets { main.java.srcDirs += 'src/main/kotlin' } From 355ba2a65b4212fa765b0ca110fe9ea8e5cf93e2 Mon Sep 17 00:00:00 2001 From: Alex Babich Date: Mon, 1 Jul 2024 11:00:22 +0300 Subject: [PATCH 2/3] - Fixed error in takeIf condition --- lib/src/common/functional_extender.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/src/common/functional_extender.dart b/lib/src/common/functional_extender.dart index 7e0bd65..c9abffc 100644 --- a/lib/src/common/functional_extender.dart +++ b/lib/src/common/functional_extender.dart @@ -25,7 +25,13 @@ extension FunctionalExtender on T? { T? takeIf(bool Function(T) f) { final T? self = this; - return self != null && f(self) ? self : null; + if (self == null) return null; + + if (f(self)) { + return self; + } else { + return null; + } } } From 8784c39b909324df8913dd30fa416b8a50d55f49 Mon Sep 17 00:00:00 2001 From: Alex Babich Date: Mon, 1 Jul 2024 12:54:06 +0300 Subject: [PATCH 3/3] - Added Java compile version --- android/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index 5224ca6..fc0801d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -39,6 +39,11 @@ android { defaultConfig { minSdkVersion 19 } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } } dependencies {