Browse Source

Updated android gradle plugin

sirekanian 2 years ago
parent
commit
43a23ab381

+ 2 - 0
app/lint.xml

@@ -5,4 +5,6 @@
         <ignore path="res/menu" />
         <ignore path="res/values" />
     </issue>
+    <!-- TODO: https://github.com/bumptech/glide/issues/4940 -->
+    <issue id="NotificationPermission" severity="ignore" />
 </lint>

+ 1 - 0
app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -2,4 +2,5 @@
 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
     <background android:drawable="@color/ic_launcher_background"/>
     <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
+    <monochrome android:drawable="@mipmap/ic_launcher_foreground"/>
 </adaptive-icon>

+ 1 - 0
app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -2,4 +2,5 @@
 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
     <background android:drawable="@color/ic_launcher_background"/>
     <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
+    <monochrome android:drawable="@mipmap/ic_launcher_foreground"/>
 </adaptive-icon>

+ 5 - 2
app/src/main/java/com/sirekanyan/knigopis/repository/config/PropertyDelegate.kt

@@ -14,8 +14,11 @@ class PreferenceDelegate<T>(
     operator fun getValue(config: ConfigurationImpl, prop: KProperty<*>): T =
         config.prefs.load(prop.name)
 
-    operator fun setValue(config: ConfigurationImpl, prop: KProperty<*>, value: T) =
-        config.prefs.edit().also { it.save(prop.name, value) }.apply()
+    operator fun setValue(config: ConfigurationImpl, prop: KProperty<*>, value: T) {
+        val editor = config.prefs.edit()
+        editor.save(prop.name, value)
+        editor.apply()
+    }
 
 }
 

+ 1 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -2,4 +2,5 @@
 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
     <background android:drawable="@color/ic_launcher_background"/>
     <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
+    <monochrome android:drawable="@mipmap/ic_launcher_foreground"/>
 </adaptive-icon>

+ 1 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -2,4 +2,5 @@
 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
     <background android:drawable="@color/ic_launcher_background"/>
     <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
+    <monochrome android:drawable="@mipmap/ic_launcher_foreground"/>
 </adaptive-icon>

+ 1 - 1
build.gradle.kts

@@ -4,7 +4,7 @@ buildscript {
         google()
     }
     dependencies {
-        classpath("com.android.tools.build:gradle:7.3.1")
+        classpath("com.android.tools.build:gradle:7.4.2")
         classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21")
     }
 }