diff --git a/app/src/main/res/values-v35/themes.xml b/app/src/main/res/values-v35/themes.xml new file mode 100644 index 00000000..d3c6e7c5 --- /dev/null +++ b/app/src/main/res/values-v35/themes.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index ee475068..b2309cf9 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -2,7 +2,7 @@ object Versions { // Plugins - const val gradle = "8.5.0" + const val gradle = "8.6.0" const val kotlin = "2.0.0" const val sonatype = "2.0.0" const val ksp = "$kotlin-1.0.22" @@ -12,8 +12,8 @@ object Versions { // App const val minSdk = 21 - const val targetSdk = 34 - const val buildTools = "34.0.0" + const val targetSdk = 35 + const val buildTools = "35.0.0" // Frames const val frames = "3.6.2" diff --git a/library/src/main/kotlin/dev/jahir/kuper/data/models/Component.kt b/library/src/main/kotlin/dev/jahir/kuper/data/models/Component.kt index 8b353d88..fb8296ee 100644 --- a/library/src/main/kotlin/dev/jahir/kuper/data/models/Component.kt +++ b/library/src/main/kotlin/dev/jahir/kuper/data/models/Component.kt @@ -101,7 +101,7 @@ data class Component( var maxX = -1 var maxY = -1 - val newBitmap = Bitmap.createBitmap(width, height, bitmap.config) + val newBitmap = bitmap.config?.let { Bitmap.createBitmap(width, height, it) } var pixel: Int for (y in 0 until height) { @@ -120,8 +120,8 @@ data class Component( } } - newBitmap.setPixels(pixels, 0, width, 0, 0, width, height) - return Bitmap.createBitmap(newBitmap, minX, minY, maxX - minX + 1, maxY - minY + 1) + newBitmap?.setPixels(pixels, 0, width, 0, 0, width, height) + return newBitmap?.let { Bitmap.createBitmap(it, minX, minY, maxX - minX + 1, maxY - minY + 1) } ?: bitmap } } }