1/*
2 * Copyright 2020 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 */
16
17/**
18 * This file was created using the `create_project.py` script located in the
19 * `<AndroidX root>/development/project-creator` directory.
20 *
21 * Please use that script when creating a new project, rather than copying an existing project and
22 * modifying its settings.
23 */
24
25import androidx.build.SoftwareType
26
27plugins {
28    id("AndroidXPlugin")
29    id("com.android.library")
30    id("AndroidXComposePlugin")
31}
32
33androidXMultiplatform {
34    androidTarget()
35
36    sourceSets {
37        commonMain {
38            dependencies {
39                implementation(libs.kotlinStdlib)
40                api("androidx.compose.foundation:foundation:1.5.0")
41                api(project(":paging:paging-common"))
42                api("androidx.compose.runtime:runtime:1.5.0")
43            }
44        }
45
46        jvmMain {
47            dependsOn(commonMain)
48        }
49
50        androidMain {
51            dependsOn(jvmMain)
52        }
53
54        commonTest {
55            dependencies {
56                implementation(project(":compose:ui:ui-tooling"))
57                implementation(project(":compose:test-utils"))
58                implementation(project(":internal-testutils-paging"))
59            }
60        }
61
62        jvmTest {
63            dependsOn(commonTest)
64            dependencies {
65                implementation(project(":compose:ui:ui-test-junit4"))
66            }
67        }
68
69        androidInstrumentedTest {
70            dependsOn(jvmTest)
71            dependencies {
72                implementation(libs.testRunner)
73                implementation(libs.junit)
74                implementation(libs.truth)
75            }
76        }
77    }
78}
79
80androidx {
81    name = "Paging-Compose"
82    type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
83    inceptionYear = "2020"
84    description = "Compose integration with Paging"
85    legacyDisableKotlinStrictApiMode = true
86    samples(project(":paging:paging-compose:paging-compose-samples"))
87}
88
89android {
90    compileSdk = 35
91    namespace = "androidx.paging.compose"
92    // TODO(b/313699418): need to update compose.runtime version to 1.6.0+
93    experimentalProperties["android.lint.useK2Uast"] = false
94}
95