[go: nahoru, domu]

[GH] Add room-paging-rxjava3 module to Room

Test: n/a
Bug: 203666906
Relnote: Integrating rxjava3 support in Room Paging

This is an imported pull request from https://github.com/androidx/androidx/pull/339.

Resolves #339
Github-Pr-Head-Sha: 274be4dcfc6f40861b476638c9671503e28129d4
GitOrigin-RevId: f081e641921b7dd64f1bba5800b4395074f902e1

Change-Id: I00d8884025aa4263a96dc509ccb8e303b53beeb8
diff --git a/docs-tip-of-tree/build.gradle b/docs-tip-of-tree/build.gradle
index 1aa287e..617e903 100644
--- a/docs-tip-of-tree/build.gradle
+++ b/docs-tip-of-tree/build.gradle
@@ -232,6 +232,7 @@
     docs(project(":room:room-migration"))
     docs(project(":room:room-paging"))
     docs(project(":room:room-paging-guava"))
+    docs(project(":room:room-paging-rxjava3"))
     docs(project(":room:room-runtime"))
     docs(project(":room:room-rxjava2"))
     docs(project(":room:room-rxjava3"))
diff --git a/room/room-paging-rxjava3/api/current.txt b/room/room-paging-rxjava3/api/current.txt
new file mode 100644
index 0000000..e6f50d0
--- /dev/null
+++ b/room/room-paging-rxjava3/api/current.txt
@@ -0,0 +1 @@
+// Signature format: 4.0
diff --git a/room/room-paging-rxjava3/api/public_plus_experimental_current.txt b/room/room-paging-rxjava3/api/public_plus_experimental_current.txt
new file mode 100644
index 0000000..e6f50d0
--- /dev/null
+++ b/room/room-paging-rxjava3/api/public_plus_experimental_current.txt
@@ -0,0 +1 @@
+// Signature format: 4.0
diff --git a/room/room-paging-rxjava3/api/res-current.txt b/room/room-paging-rxjava3/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/room/room-paging-rxjava3/api/res-current.txt
diff --git a/room/room-paging-rxjava3/api/restricted_current.txt b/room/room-paging-rxjava3/api/restricted_current.txt
new file mode 100644
index 0000000..e6f50d0
--- /dev/null
+++ b/room/room-paging-rxjava3/api/restricted_current.txt
@@ -0,0 +1 @@
+// Signature format: 4.0
diff --git a/room/room-paging-rxjava3/build.gradle b/room/room-paging-rxjava3/build.gradle
new file mode 100644
index 0000000..26230a9
--- /dev/null
+++ b/room/room-paging-rxjava3/build.gradle
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2022 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.
+ */
+
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+import androidx.build.LibraryType
+import androidx.build.Publish
+
+
+plugins {
+    id("AndroidXPlugin")
+    id("com.android.library")
+    id("org.jetbrains.kotlin.android")
+}
+
+dependencies {
+    api(libs.kotlinStdlib)
+    // Add dependencies here
+}
+
+// Allow usage of Kotlin's @OptIn.
+tasks.withType(KotlinCompile).configureEach {
+    kotlinOptions {
+        freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
+    }
+}
+
+androidx {
+    name = "Room Paging RxJava3"
+    type = LibraryType.PUBLISHED_LIBRARY
+    mavenGroup = LibraryGroups.ROOM
+    inceptionYear = "2022"
+    description = "RxJava3 integration in Room Paging"
+    publish = Publish.SNAPSHOT_ONLY
+}
+
+android {
+    namespace "androidx.room.paging.rxjava3"
+}
\ No newline at end of file
diff --git a/room/room-paging-rxjava3/src/androidTest/AndroidManifest.xml b/room/room-paging-rxjava3/src/androidTest/AndroidManifest.xml
new file mode 100644
index 0000000..58147dc
--- /dev/null
+++ b/room/room-paging-rxjava3/src/androidTest/AndroidManifest.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2022 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.
+  -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
+
diff --git a/room/room-paging-rxjava3/src/main/AndroidManifest.xml b/room/room-paging-rxjava3/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..923060a
--- /dev/null
+++ b/room/room-paging-rxjava3/src/main/AndroidManifest.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2022 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.
+  -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index 5ba352a..9740632 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -678,6 +678,7 @@
 includeProject(":room:room-migration", [BuildType.MAIN, BuildType.COMPOSE])
 includeProject(":room:room-paging", [BuildType.MAIN, BuildType.COMPOSE])
 includeProject(":room:room-paging-guava", [BuildType.MAIN])
+includeProject(":room:room-paging-rxjava3", [BuildType.MAIN])
 includeProject(":room:room-runtime", [BuildType.MAIN, BuildType.COMPOSE])
 includeProject(":room:room-runtime-lint", [BuildType.MAIN, BuildType.COMPOSE])
 includeProject(":room:room-rxjava2", [BuildType.MAIN])