| /* |
| * Copyright (C) 2021 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 androidx.build.KotlinTarget |
| import androidx.build.PlatformIdentifier |
| import androidx.build.LibraryType |
| import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType |
| |
| plugins { |
| id("AndroidXPlugin") |
| id("com.google.devtools.ksp") |
| id("com.android.library") |
| } |
| |
| androidXMultiplatform { |
| android() |
| jvm() |
| mac() |
| linux() |
| ios() |
| |
| defaultPlatform(PlatformIdentifier.ANDROID) |
| |
| sourceSets { |
| commonMain { |
| dependencies { |
| api(libs.kotlinStdlib) |
| api("androidx.paging:paging-common:3.3.2") |
| api(project(":room:room-runtime")) |
| } |
| } |
| |
| commonTest { |
| dependencies { |
| implementation(libs.kotlinCoroutinesTest) |
| implementation(project(":kruth:kruth")) |
| } |
| } |
| |
| androidMain { |
| dependsOn(commonMain) |
| } |
| |
| jvmNativeMain { |
| dependsOn(commonMain) |
| } |
| |
| jvmMain { |
| dependsOn(jvmNativeMain) |
| } |
| |
| nativeMain { |
| dependsOn(jvmNativeMain) |
| dependencies { |
| implementation(libs.atomicFu) |
| } |
| } |
| |
| androidInstrumentedTest { |
| dependsOn(commonTest) |
| dependencies { |
| implementation(libs.junit) |
| implementation(project(":internal-testutils-common")) |
| implementation(libs.kotlinTestJunit) |
| implementation(libs.testExtJunit) |
| implementation(libs.testCore) |
| implementation(libs.testRunner) |
| implementation("androidx.arch.core:core-testing:2.2.0") |
| implementation("androidx.paging:paging-testing:3.3.2") |
| } |
| } |
| targets.configureEach { target -> |
| if (target.platformType == KotlinPlatformType.native) { |
| target.compilations["main"].defaultSourceSet { |
| dependsOn(nativeMain) |
| } |
| } |
| } |
| } |
| } |
| |
| android { |
| namespace = "androidx.room.paging" |
| } |
| |
| dependencies { |
| add("kspAndroidAndroidTest", project(":room:room-compiler")) |
| } |
| |
| androidx { |
| name = "Room Paging" |
| type = LibraryType.PUBLISHED_LIBRARY |
| inceptionYear = "2021" |
| description = "Room Paging integration" |
| kotlinTarget = KotlinTarget.KOTLIN_2_0 |
| } |
| |
| ksp { |
| useKsp2 = true |
| } |