blob: 7041ca91c1573795dad0ca7ccbebc8793ab90162 [file] [log] [blame]
Dustin Lam73f0b5a2021-05-21 14:31:38 -07001/*
2 * Copyright (C) 2021 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Aurimas Liutikasb3483fd2021-06-04 16:56:37 -070016
Daniel Santiago Rivera6e1e6e12024-12-16 22:13:20 -050017
18import androidx.build.KotlinTarget
elifbilgine7a8b7c2024-07-01 08:00:23 -070019import androidx.build.PlatformIdentifier
Aurimas Liutikas37e83212025-01-23 13:26:10 -080020import androidx.build.SoftwareType
elifbilgincf0073f2024-07-09 06:09:59 -070021import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
Dustin Lam73f0b5a2021-05-21 14:31:38 -070022
23plugins {
24 id("AndroidXPlugin")
Clara Fokc96fe7d2022-06-09 14:42:40 -070025 id("com.google.devtools.ksp")
elifbilgine7a8b7c2024-07-01 08:00:23 -070026 id("com.android.library")
27}
28
29androidXMultiplatform {
Aurimas Liutikas03fa9fb2025-02-06 11:17:13 -080030 androidTarget()
elifbilgine7a8b7c2024-07-01 08:00:23 -070031 jvm()
32 mac()
33 linux()
34 ios()
35
36 defaultPlatform(PlatformIdentifier.ANDROID)
37
38 sourceSets {
39 commonMain {
40 dependencies {
41 api(libs.kotlinStdlib)
Prajakta Patilaa38ca32024-08-02 18:59:43 +000042 api("androidx.paging:paging-common:3.3.2")
elifbilgine7a8b7c2024-07-01 08:00:23 -070043 api(project(":room:room-runtime"))
44 }
45 }
46
47 commonTest {
48 dependencies {
49 implementation(libs.kotlinCoroutinesTest)
50 implementation(project(":kruth:kruth"))
51 }
52 }
53
54 androidMain {
55 dependsOn(commonMain)
56 }
57
elifbilgincf0073f2024-07-09 06:09:59 -070058 jvmNativeMain {
59 dependsOn(commonMain)
60 }
61
62 jvmMain {
63 dependsOn(jvmNativeMain)
64 }
65
66 nativeMain {
67 dependsOn(jvmNativeMain)
Daniel Santiago Rivera62aa2372025-01-15 10:57:16 -050068 dependencies {
69 implementation(libs.atomicFu)
70 }
elifbilgincf0073f2024-07-09 06:09:59 -070071 }
72
elifbilgine7a8b7c2024-07-01 08:00:23 -070073 androidInstrumentedTest {
74 dependsOn(commonTest)
75 dependencies {
76 implementation(libs.junit)
77 implementation(project(":internal-testutils-common"))
78 implementation(libs.kotlinTestJunit)
79 implementation(libs.testExtJunit)
80 implementation(libs.testCore)
81 implementation(libs.testRunner)
82 implementation("androidx.arch.core:core-testing:2.2.0")
Prajakta Patilaa38ca32024-08-02 18:59:43 +000083 implementation("androidx.paging:paging-testing:3.3.2")
elifbilgine7a8b7c2024-07-01 08:00:23 -070084 }
85 }
elifbilgincf0073f2024-07-09 06:09:59 -070086 targets.configureEach { target ->
87 if (target.platformType == KotlinPlatformType.native) {
88 target.compilations["main"].defaultSourceSet {
89 dependsOn(nativeMain)
90 }
91 }
92 }
elifbilgine7a8b7c2024-07-01 08:00:23 -070093 }
Clara Fok2c9450d2021-06-15 16:30:09 -070094}
95
96android {
Aurimas Liutikas77952822024-12-04 18:00:17 -080097 namespace = "androidx.room.paging"
Dustin Lam73f0b5a2021-05-21 14:31:38 -070098}
99
100dependencies {
elifbilgine7a8b7c2024-07-01 08:00:23 -0700101 add("kspAndroidAndroidTest", project(":room:room-compiler"))
Clara Fok2c9450d2021-06-15 16:30:09 -0700102}
103
Dustin Lam73f0b5a2021-05-21 14:31:38 -0700104androidx {
105 name = "Room Paging"
Aurimas Liutikas37e83212025-01-23 13:26:10 -0800106 type = SoftwareType.PUBLISHED_LIBRARY
Dustin Lam73f0b5a2021-05-21 14:31:38 -0700107 inceptionYear = "2021"
108 description = "Room Paging integration"
Daniel Santiago Rivera6e1e6e12024-12-16 22:13:20 -0500109 kotlinTarget = KotlinTarget.KOTLIN_2_0
110}
111