From ec31b9575545887d8a7a43d306e9d198d3cc5d0c Mon Sep 17 00:00:00 2001 From: Mozart Louis <5649571+madebymozart@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:32:20 -0400 Subject: [PATCH] Fix build crash issue due to sample failing (#198) * Fix build crash issue due to sample fail * Switch to API 34 --- app/build.gradle.kts | 4 ++-- build.gradle.kts | 2 +- gradle/libs.versions.toml | 2 ++ .../platform/graphics/ultrahdr/opengl/UltraHDRWithOpenGL.kt | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4e383b1e..39f68564 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -30,12 +30,12 @@ java { android { namespace = "com.example.platform.app" - compileSdk = 34 + compileSdk = 35 defaultConfig { applicationId = "com.example.platform.app" minSdk = 21 - targetSdk = 34 + targetSdk = 35 versionCode = 1 versionName = "1.0" diff --git a/build.gradle.kts b/build.gradle.kts index 292f0233..4411e036 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,7 +15,7 @@ */ buildscript { dependencies { - classpath("de.undercouch:gradle-download-task:4.1.2") + classpath(libs.gradle.download.task) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4d421fed..a710f81c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -21,6 +21,7 @@ androidx-window = "1.2.0" agp = "8.5.2" casa = "0.5.1" coil = "2.4.0" +gradleDownloadTask = "4.1.2" ksp = "1.9.22-1.0.17" compose-bom = "2024.02.00" composeCompiler = "1.5.9" @@ -96,6 +97,7 @@ coil-video = { module = "io.coil-kt:coil-video", version.ref = "coil" } google-ksp-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" } +gradle-download-task = { module = "de.undercouch:gradle-download-task", version.ref = "gradleDownloadTask" } hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" } hilt-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" } hilt-testing = { group = "com.google.dagger", name = "hilt-android-testing", version.ref = "hilt" } diff --git a/samples/graphics/ultrahdr/src/main/java/com/example/platform/graphics/ultrahdr/opengl/UltraHDRWithOpenGL.kt b/samples/graphics/ultrahdr/src/main/java/com/example/platform/graphics/ultrahdr/opengl/UltraHDRWithOpenGL.kt index becc8c74..a17781fc 100644 --- a/samples/graphics/ultrahdr/src/main/java/com/example/platform/graphics/ultrahdr/opengl/UltraHDRWithOpenGL.kt +++ b/samples/graphics/ultrahdr/src/main/java/com/example/platform/graphics/ultrahdr/opengl/UltraHDRWithOpenGL.kt @@ -70,7 +70,7 @@ class UltraHDRWithOpenGL : Fragment(), } companion object { - fun fromInt(value: Int) = ExtendedBrightnessValue.values().first { it.value == value } + fun fromInt(value: Int) = entries.first { it.value == value } } }