diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3ba58b5..4fa7e2b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,5 +1,3 @@ -import org.jetbrains.kotlin.kapt3.base.Kapt.kapt - plugins { kotlin("kapt") id("com.android.application") @@ -52,7 +50,7 @@ android { kotlinCompilerExtensionVersion = Versions.Compose.BUILD } - packagingOptions { + packaging { resources { resources.excludes.add("/META-INF/{AL2.0,LGPL2.1}") } diff --git a/app/src/main/java/pt/andre/widgetcandy/configuration/usecase/GetUserWallpaperUseCase.kt b/app/src/main/java/pt/andre/widgetcandy/configuration/usecase/GetUserWallpaperUseCase.kt index c10112b..bba5119 100644 --- a/app/src/main/java/pt/andre/widgetcandy/configuration/usecase/GetUserWallpaperUseCase.kt +++ b/app/src/main/java/pt/andre/widgetcandy/configuration/usecase/GetUserWallpaperUseCase.kt @@ -1,5 +1,6 @@ package pt.andre.widgetcandy.configuration.usecase +import android.annotation.SuppressLint import android.app.WallpaperManager import android.content.Context import android.graphics.Bitmap @@ -11,11 +12,12 @@ internal class GetUserWallpaperUseCase @Inject constructor( @ApplicationContext private val context: Context, ) { + @SuppressLint("MissingPermission") @Suppress("SwallowedException") operator fun invoke(): Bitmap? = try { WallpaperManager.getInstance(context) .drawable - .toBitmapOrNull() + ?.toBitmapOrNull() } catch (e: SecurityException) { null } diff --git a/buildSrc/src/main/kotlin/Configuration.kt b/buildSrc/src/main/kotlin/Configuration.kt index 7ff9c77..34d678a 100644 --- a/buildSrc/src/main/kotlin/Configuration.kt +++ b/buildSrc/src/main/kotlin/Configuration.kt @@ -2,8 +2,8 @@ object Configuration { const val VERSION_CODE = 1 const val VERSION_NAME = "1.0.0" - const val TARGET_SDK = 33 - const val COMPILE_SDK = 33 + const val TARGET_SDK = 34 + const val COMPILE_SDK = 34 const val MINIMUM_SDK = 21 const val NAMESPACE = "pt.andre.widgetcandy" diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 241954a..9cabf84 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -3,38 +3,38 @@ import org.gradle.api.JavaVersion object Versions { object AndroidX { - const val ACTIVITY = "1.7.0" - const val CORE = "1.10.0" + const val ACTIVITY = "1.8.2" + const val CORE = "1.12.0" const val DATASTORE = "1.0.0" const val LIFECYCLE = "2.6.1" const val GLANCE = "1.0.0-alpha05" } object Accompanist { - const val PERMISSION = "0.30.1" + const val PERMISSION = "0.32.0" } object Build { val JAVA_VERSION = JavaVersion.VERSION_1_8 const val JVM_TARGET = "1.8" - const val GRADLE_TOOLS = "7.4.0" + const val GRADLE_TOOLS = "8.2.0" const val KOTLIN_GRADLE = "1.7.20" - const val KOTLIN_JVM = "1.8.10" + const val KOTLIN_JVM = "1.9.21" } const val COIL = "2.2.2" object Compose { - const val HILT = "1.0.0" - const val BOM = "2023.04.00" - const val BUILD = "1.4.4" - const val GOOGLE_FONTS = "1.4.0" - const val LIFECYCLE = "2.6.1" + const val HILT = "1.1.0" + const val BOM = "2023.10.01" + const val BUILD = "1.5.6" + const val GOOGLE_FONTS = "1.5.4" + const val LIFECYCLE = "2.6.2" const val NAVIGATION = "2.5.3" } - const val HILT = "2.45" + const val HILT = "2.49" object Detekt { const val DETEKT = "1.19.0" @@ -45,10 +45,10 @@ object Versions { } object Kotlin { - const val COROUTINES = "1.6.4" + const val COROUTINES = "1.7.3" } - const val MOCKK = "1.13.4" + const val MOCKK = "1.13.8" - const val TURBINE = "0.12.3" + const val TURBINE = "1.0.0" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 24f8169..2608917 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Apr 07 11:19:31 CEST 2023 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME