Enable watchosDeviceArm64 by default for watchos

Relnote: Adds support for watchosDeviceArm64 KMP target and target kotlin 1.9
Test: None
Bug: 364652024
Change-Id: Icf15d056ce2380ca3c733fb1a93fd502f60b40e4
diff --git a/paging/paging-common/bcv/native/current.txt b/paging/paging-common/bcv/native/current.txt
index 64890c9..054dacb 100644
--- a/paging/paging-common/bcv/native/current.txt
+++ b/paging/paging-common/bcv/native/current.txt
@@ -1,5 +1,5 @@
 // Klib ABI Dump
-// Targets: [iosArm64, iosSimulatorArm64, iosX64, linuxArm64, linuxX64, macosArm64, macosX64, tvosArm64, tvosSimulatorArm64, tvosX64, watchosArm32, watchosArm64, watchosSimulatorArm64, watchosX64]
+// Targets: [iosArm64, iosSimulatorArm64, iosX64, linuxArm64, linuxX64, macosArm64, macosX64, tvosArm64, tvosSimulatorArm64, tvosX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64, watchosX64]
 // Rendering settings:
 // - Signature version: 2
 // - Show manifest properties: true
@@ -15,6 +15,9 @@
     enum entry PLACEHOLDER_POSITION_CHANGE // androidx.paging/DiffingChangePayload.PLACEHOLDER_POSITION_CHANGE|null[0]
     enum entry PLACEHOLDER_TO_ITEM // androidx.paging/DiffingChangePayload.PLACEHOLDER_TO_ITEM|null[0]
 
+    final val entries // androidx.paging/DiffingChangePayload.entries|#static{}entries[0]
+        final fun <get-entries>(): kotlin.enums/EnumEntries<androidx.paging/DiffingChangePayload> // androidx.paging/DiffingChangePayload.entries.<get-entries>|<get-entries>#static(){}[0]
+
     final fun valueOf(kotlin/String): androidx.paging/DiffingChangePayload // androidx.paging/DiffingChangePayload.valueOf|valueOf#static(kotlin.String){}[0]
     final fun values(): kotlin/Array<androidx.paging/DiffingChangePayload> // androidx.paging/DiffingChangePayload.values|values#static(){}[0]
 }
@@ -24,6 +27,9 @@
     enum entry PREPEND // androidx.paging/LoadType.PREPEND|null[0]
     enum entry REFRESH // androidx.paging/LoadType.REFRESH|null[0]
 
+    final val entries // androidx.paging/LoadType.entries|#static{}entries[0]
+        final fun <get-entries>(): kotlin.enums/EnumEntries<androidx.paging/LoadType> // androidx.paging/LoadType.entries.<get-entries>|<get-entries>#static(){}[0]
+
     final fun valueOf(kotlin/String): androidx.paging/LoadType // androidx.paging/LoadType.valueOf|valueOf#static(kotlin.String){}[0]
     final fun values(): kotlin/Array<androidx.paging/LoadType> // androidx.paging/LoadType.values|values#static(){}[0]
 }
@@ -32,6 +38,9 @@
     enum entry FULLY_COMPLETE // androidx.paging/TerminalSeparatorType.FULLY_COMPLETE|null[0]
     enum entry SOURCE_COMPLETE // androidx.paging/TerminalSeparatorType.SOURCE_COMPLETE|null[0]
 
+    final val entries // androidx.paging/TerminalSeparatorType.entries|#static{}entries[0]
+        final fun <get-entries>(): kotlin.enums/EnumEntries<androidx.paging/TerminalSeparatorType> // androidx.paging/TerminalSeparatorType.entries.<get-entries>|<get-entries>#static(){}[0]
+
     final fun valueOf(kotlin/String): androidx.paging/TerminalSeparatorType // androidx.paging/TerminalSeparatorType.valueOf|valueOf#static(kotlin.String){}[0]
     final fun values(): kotlin/Array<androidx.paging/TerminalSeparatorType> // androidx.paging/TerminalSeparatorType.values|values#static(){}[0]
 }
@@ -167,6 +176,9 @@
         enum entry LAUNCH_INITIAL_REFRESH // androidx.paging/RemoteMediator.InitializeAction.LAUNCH_INITIAL_REFRESH|null[0]
         enum entry SKIP_INITIAL_REFRESH // androidx.paging/RemoteMediator.InitializeAction.SKIP_INITIAL_REFRESH|null[0]
 
+        final val entries // androidx.paging/RemoteMediator.InitializeAction.entries|#static{}entries[0]
+            final fun <get-entries>(): kotlin.enums/EnumEntries<androidx.paging/RemoteMediator.InitializeAction> // androidx.paging/RemoteMediator.InitializeAction.entries.<get-entries>|<get-entries>#static(){}[0]
+
         final fun valueOf(kotlin/String): androidx.paging/RemoteMediator.InitializeAction // androidx.paging/RemoteMediator.InitializeAction.valueOf|valueOf#static(kotlin.String){}[0]
         final fun values(): kotlin/Array<androidx.paging/RemoteMediator.InitializeAction> // androidx.paging/RemoteMediator.InitializeAction.values|values#static(){}[0]
     }
diff --git a/paging/paging-common/build.gradle b/paging/paging-common/build.gradle
index 1c5792b..018e04a 100644
--- a/paging/paging-common/build.gradle
+++ b/paging/paging-common/build.gradle
@@ -22,6 +22,8 @@
  * modifying its settings.
  */
 
+
+import androidx.build.KotlinTarget
 import androidx.build.LibraryType
 import androidx.build.PlatformIdentifier
 import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
@@ -55,7 +57,7 @@
             dependencies {
                 api(libs.kotlinStdlib)
                 api(libs.kotlinCoroutinesCore)
-                api("androidx.annotation:annotation:1.8.1")
+                api("androidx.annotation:annotation:1.9.1")
             }
         }
 
@@ -155,5 +157,6 @@
     description = "Android Paging-Common"
     legacyDisableKotlinStrictApiMode = true
     metalavaK2UastEnabled = false
+    kotlinTarget = KotlinTarget.KOTLIN_1_9
     samples(project(":paging:paging-samples"))
 }
diff --git a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
index ceeecc6..14d846d 100644
--- a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
+++ b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
@@ -27,9 +27,9 @@
 import androidx.paging.PageEvent.StaticList
 import androidx.paging.internal.CopyOnWriteArrayList
 import androidx.paging.internal.appendMediatorStatesIfNotNull
+import kotlin.concurrent.Volatile
 import kotlin.coroutines.CoroutineContext
 import kotlin.jvm.JvmSuppressWildcards
-import kotlin.jvm.Volatile
 import kotlinx.coroutines.Dispatchers
 import kotlinx.coroutines.channels.BufferOverflow.DROP_OLDEST
 import kotlinx.coroutines.flow.Flow
diff --git a/paging/paging-common/src/nativeMain/kotlin/androidx/paging/internal/Atomics.native.kt b/paging/paging-common/src/nativeMain/kotlin/androidx/paging/internal/Atomics.native.kt
index 8f7329a..314e18f 100644
--- a/paging/paging-common/src/nativeMain/kotlin/androidx/paging/internal/Atomics.native.kt
+++ b/paging/paging-common/src/nativeMain/kotlin/androidx/paging/internal/Atomics.native.kt
@@ -18,7 +18,8 @@
 
 package androidx.paging.internal
 
-import kotlin.native.internal.createCleaner
+import kotlin.experimental.ExperimentalNativeApi
+import kotlin.native.ref.createCleaner
 import kotlinx.atomicfu.AtomicBoolean as AtomicFuAtomicBoolean
 import kotlinx.atomicfu.AtomicInt as AtomicFuAtomicInt
 import kotlinx.atomicfu.atomic
@@ -48,7 +49,7 @@
     private val resources = Resources()
 
     @Suppress("unused") // The returned Cleaner must be assigned to a property
-    @ExperimentalStdlibApi
+    @ExperimentalNativeApi
     private val cleaner = createCleaner(resources, Resources::destroy)
 
     actual fun lock() {
diff --git a/paging/paging-compose/build.gradle b/paging/paging-compose/build.gradle
index df215df..44cc355 100644
--- a/paging/paging-compose/build.gradle
+++ b/paging/paging-compose/build.gradle
@@ -21,6 +21,8 @@
  * Please use that script when creating a new project, rather than copying an existing project and
  * modifying its settings.
  */
+
+import androidx.build.KotlinTarget
 import androidx.build.LibraryType
 
 plugins {
@@ -83,6 +85,7 @@
     description = "Compose integration with Paging"
     legacyDisableKotlinStrictApiMode = true
     metalavaK2UastEnabled = false
+    kotlinTarget = KotlinTarget.KOTLIN_1_9
     samples(project(":paging:paging-compose:paging-compose-samples"))
 }
 
diff --git a/paging/paging-compose/samples/build.gradle b/paging/paging-compose/samples/build.gradle
index 2980ac1..7a5578a 100644
--- a/paging/paging-compose/samples/build.gradle
+++ b/paging/paging-compose/samples/build.gradle
@@ -21,6 +21,8 @@
  * Please use that script when creating a new project, rather than copying an existing project and
  * modifying its settings.
  */
+
+import androidx.build.KotlinTarget
 import androidx.build.LibraryType
 
 plugins {
@@ -45,6 +47,7 @@
     type = LibraryType.SAMPLES
     inceptionYear = "2020"
     description = "Contains the sample code for the Androidx Paging library compose interop"
+    kotlinTarget = KotlinTarget.KOTLIN_1_9
 }
 
 android {
diff --git a/paging/paging-guava/build.gradle b/paging/paging-guava/build.gradle
index 8cd1581..c62277b 100644
--- a/paging/paging-guava/build.gradle
+++ b/paging/paging-guava/build.gradle
@@ -21,6 +21,8 @@
  * Please use that script when creating a new project, rather than copying an existing project and
  * modifying its settings.
  */
+
+import androidx.build.KotlinTarget
 import androidx.build.LibraryType
 
 plugins {
@@ -48,7 +50,7 @@
     inceptionYear = "2019"
     description = "Android Paging Guava"
     legacyDisableKotlinStrictApiMode = true
-    legacyDisableKotlinStrictApiMode = true
+    kotlinTarget = KotlinTarget.KOTLIN_1_9
     samples(project(":paging:paging-samples"))
 }
 
diff --git a/paging/paging-runtime/build.gradle b/paging/paging-runtime/build.gradle
index c7ec26a..089bf53 100644
--- a/paging/paging-runtime/build.gradle
+++ b/paging/paging-runtime/build.gradle
@@ -21,6 +21,8 @@
  * Please use that script when creating a new project, rather than copying an existing project and
  * modifying its settings.
  */
+
+import androidx.build.KotlinTarget
 import androidx.build.LibraryType
 
 plugins {
@@ -67,5 +69,6 @@
     inceptionYear = "2017"
     description = "Android Paging-Runtime"
     legacyDisableKotlinStrictApiMode = true
+    kotlinTarget = KotlinTarget.KOTLIN_1_9
     samples(project(":paging:paging-samples"))
 }
diff --git a/paging/paging-rxjava2-ktx/build.gradle b/paging/paging-rxjava2-ktx/build.gradle
index 7b50469..974447a 100644
--- a/paging/paging-rxjava2-ktx/build.gradle
+++ b/paging/paging-rxjava2-ktx/build.gradle
@@ -21,6 +21,8 @@
  * Please use that script when creating a new project, rather than copying an existing project and
  * modifying its settings.
  */
+
+import androidx.build.KotlinTarget
 import androidx.build.LibraryType
 
 plugins {
@@ -47,6 +49,7 @@
     type = LibraryType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
     inceptionYear = "2018"
     description = "Kotlin extensions for 'paging-rxjava2' artifact"
+    kotlinTarget = KotlinTarget.KOTLIN_1_9
 }
 
 android {
diff --git a/paging/paging-rxjava2/build.gradle b/paging/paging-rxjava2/build.gradle
index 88681ad..519c137 100644
--- a/paging/paging-rxjava2/build.gradle
+++ b/paging/paging-rxjava2/build.gradle
@@ -21,6 +21,8 @@
  * Please use that script when creating a new project, rather than copying an existing project and
  * modifying its settings.
  */
+
+import androidx.build.KotlinTarget
 import androidx.build.LibraryType
 
 plugins {
@@ -56,6 +58,7 @@
     inceptionYear = "2018"
     description = "Android Paging-RXJava2"
     legacyDisableKotlinStrictApiMode = true
+    kotlinTarget = KotlinTarget.KOTLIN_1_9
     samples(project(":paging:paging-samples"))
 }
 
diff --git a/paging/paging-rxjava3/build.gradle b/paging/paging-rxjava3/build.gradle
index ff402ad..7f35dbb 100644
--- a/paging/paging-rxjava3/build.gradle
+++ b/paging/paging-rxjava3/build.gradle
@@ -21,6 +21,8 @@
  * Please use that script when creating a new project, rather than copying an existing project and
  * modifying its settings.
  */
+
+import androidx.build.KotlinTarget
 import androidx.build.LibraryType
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
@@ -57,6 +59,7 @@
     inceptionYear = "2020"
     description = "Android Paging-RxJava3"
     legacyDisableKotlinStrictApiMode = true
+    kotlinTarget = KotlinTarget.KOTLIN_1_9
 }
 
 android {
diff --git a/paging/paging-testing/bcv/native/current.txt b/paging/paging-testing/bcv/native/current.txt
index da3f864..3333b92 100644
--- a/paging/paging-testing/bcv/native/current.txt
+++ b/paging/paging-testing/bcv/native/current.txt
@@ -1,5 +1,5 @@
 // Klib ABI Dump
-// Targets: [iosArm64, iosSimulatorArm64, iosX64, linuxArm64, linuxX64, macosArm64, macosX64, tvosArm64, tvosSimulatorArm64, tvosX64, watchosArm32, watchosArm64, watchosSimulatorArm64, watchosX64]
+// Targets: [iosArm64, iosSimulatorArm64, iosX64, linuxArm64, linuxX64, macosArm64, macosX64, tvosArm64, tvosSimulatorArm64, tvosX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64, watchosX64]
 // Rendering settings:
 // - Signature version: 2
 // - Show manifest properties: true
@@ -11,6 +11,9 @@
     enum entry RETURN_CURRENT_SNAPSHOT // androidx.paging.testing/ErrorRecovery.RETURN_CURRENT_SNAPSHOT|null[0]
     enum entry THROW // androidx.paging.testing/ErrorRecovery.THROW|null[0]
 
+    final val entries // androidx.paging.testing/ErrorRecovery.entries|#static{}entries[0]
+        final fun <get-entries>(): kotlin.enums/EnumEntries<androidx.paging.testing/ErrorRecovery> // androidx.paging.testing/ErrorRecovery.entries.<get-entries>|<get-entries>#static(){}[0]
+
     final fun valueOf(kotlin/String): androidx.paging.testing/ErrorRecovery // androidx.paging.testing/ErrorRecovery.valueOf|valueOf#static(kotlin.String){}[0]
     final fun values(): kotlin/Array<androidx.paging.testing/ErrorRecovery> // androidx.paging.testing/ErrorRecovery.values|values#static(){}[0]
 }
diff --git a/paging/paging-testing/build.gradle b/paging/paging-testing/build.gradle
index 50837cb..f79d5be 100644
--- a/paging/paging-testing/build.gradle
+++ b/paging/paging-testing/build.gradle
@@ -21,6 +21,8 @@
  * Please use that script when creating a new project, rather than copying an existing project and
  * modifying its settings.
  */
+
+import androidx.build.KotlinTarget
 import androidx.build.LibraryType
 import androidx.build.PlatformIdentifier
 import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
@@ -135,5 +137,6 @@
     inceptionYear = "2022"
     description = "Test artifact for Paging implementation"
     metalavaK2UastEnabled = false
+    kotlinTarget = KotlinTarget.KOTLIN_1_9
 }