Merge "Update library versions." into androidx-main
diff --git a/activity/activity/build.gradle b/activity/activity/build.gradle
index e62b3c9..5257fc3 100644
--- a/activity/activity/build.gradle
+++ b/activity/activity/build.gradle
@@ -28,7 +28,7 @@
api("androidx.lifecycle:lifecycle-viewmodel:2.6.1")
api("androidx.savedstate:savedstate:1.2.1")
api("androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1")
- implementation("androidx.profileinstaller:profileinstaller:1.3.1")
+ implementation("androidx.profileinstaller:profileinstaller:1.4.0-rc01")
implementation("androidx.tracing:tracing:1.0.0")
implementation(libs.kotlinCoroutinesCore)
api(libs.kotlinStdlib)
diff --git a/room/integration-tests/multiplatformtestapp/src/jvmTest/kotlin/androidx/room/integration/multiplatformtestapp/test/UUIDTest.kt b/room/integration-tests/multiplatformtestapp/src/jvmTest/kotlin/androidx/room/integration/multiplatformtestapp/test/UUIDTest.kt
new file mode 100644
index 0000000..0dcc0f8
--- /dev/null
+++ b/room/integration-tests/multiplatformtestapp/src/jvmTest/kotlin/androidx/room/integration/multiplatformtestapp/test/UUIDTest.kt
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.room.integration.multiplatformtestapp.test
+
+import androidx.kruth.assertThat
+import androidx.room.Dao
+import androidx.room.Database
+import androidx.room.Entity
+import androidx.room.Insert
+import androidx.room.PrimaryKey
+import androidx.room.Query
+import androidx.room.Room
+import androidx.room.RoomDatabase
+import androidx.room.integration.multiplatformtestapp.test.UUIDTest.SampleJvmDatabase
+import androidx.sqlite.driver.bundled.BundledSQLiteDriver
+import java.util.UUID
+import kotlin.test.Test
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.test.runTest
+
+class UUIDTest {
+ @Test
+ fun testUUIDQuery() = runTest {
+ val db =
+ Room.inMemoryDatabaseBuilder<SampleJvmDatabase>()
+ .setDriver(BundledSQLiteDriver())
+ .setQueryCoroutineContext(Dispatchers.IO)
+ .build()
+ val dao = db.dao()
+ val text = "88c6af75-8d2a-489c-85c9-92e5dd8a108c"
+ val uuid = UUID.fromString(text)
+
+ dao.insertWithQuery(uuid)
+ assertThat(dao.getEntity(uuid)).isEqualTo(UUIDEntity(uuid))
+ }
+
+ @Database(entities = [UUIDEntity::class], version = 1, exportSchema = false)
+ abstract class SampleJvmDatabase : RoomDatabase() {
+ abstract fun dao(): ByteDao
+ }
+
+ @Dao
+ interface ByteDao {
+ @Insert suspend fun insert(byteEntity: UUIDEntity)
+
+ @Query("INSERT INTO UUIDEntity (id_UUID) VALUES (:uuid)")
+ suspend fun insertWithQuery(uuid: UUID): Long
+
+ @Query("SELECT * FROM UUIDEntity WHERE id_UUID = :uuid")
+ suspend fun getEntity(uuid: UUID): UUIDEntity
+ }
+
+ @Entity
+ data class UUIDEntity(
+ @PrimaryKey val id_UUID: UUID,
+ )
+}
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
index 3cc5e276..b6d986f 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
@@ -394,7 +394,6 @@
return when {
builtInConverterFlags.enums.isEnabled() && typeElement?.isEnum() == true ->
EnumColumnTypeAdapter(typeElement, type)
- !context.isAndroidOnlyTarget() -> null // UUID and ByteBuffer are Android-only
builtInConverterFlags.uuid.isEnabled() && type.isUUID() -> UuidColumnTypeAdapter(type)
builtInConverterFlags.byteBuffer.isEnabled() && type.isByteBuffer() ->
ByteBufferColumnTypeAdapter(type)
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/UUIDUtil.android.kt b/room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/UUIDUtil.jvmAndroid.kt
similarity index 100%
rename from room/room-runtime/src/androidMain/kotlin/androidx/room/util/UUIDUtil.android.kt
rename to room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/UUIDUtil.jvmAndroid.kt
diff --git a/tv/integration-tests/macrobenchmark-target/build.gradle b/tv/integration-tests/macrobenchmark-target/build.gradle
index 2fca186..7d55cd9 100644
--- a/tv/integration-tests/macrobenchmark-target/build.gradle
+++ b/tv/integration-tests/macrobenchmark-target/build.gradle
@@ -43,11 +43,7 @@
dependencies {
implementation(libs.kotlinStdlib)
implementation("androidx.activity:activity-compose:1.9.0")
- implementation("androidx.compose.runtime:runtime:1.6.7")
implementation("androidx.compose.runtime:runtime-tracing:1.0.0-beta01")
- implementation("androidx.compose.ui:ui:1.6.7")
- implementation("androidx.compose.ui:ui-tooling:1.6.7")
- implementation("androidx.profileinstaller:profileinstaller:1.3.1")
implementation(project(":tv:tv-foundation"))
implementation(project(":tv:tv-material"))
diff --git a/tv/tv-foundation/build.gradle b/tv/tv-foundation/build.gradle
index 8d72b69..ea396c0 100644
--- a/tv/tv-foundation/build.gradle
+++ b/tv/tv-foundation/build.gradle
@@ -37,9 +37,7 @@
dependencies {
api(libs.kotlinStdlib)
- def annotationVersion = "1.8.0"
def composeVersion = "1.6.8"
- def profileInstallerVersion = "1.3.1"
api("androidx.annotation:annotation:1.8.1")
api("androidx.compose.animation:animation:$composeVersion")
@@ -51,7 +49,7 @@
api("androidx.compose.ui:ui-graphics:$composeVersion")
api("androidx.compose.ui:ui-text:$composeVersion")
- implementation("androidx.profileinstaller:profileinstaller:$profileInstallerVersion")
+ implementation("androidx.profileinstaller:profileinstaller:1.4.0-rc01")
androidTestImplementation(libs.truth)
androidTestImplementation(project(":compose:runtime:runtime"))