blob: 9a32fcdfbfbf19dad5108754f074ff49eb1adc1a [file] [log] [blame]
Chris Craik9fd8e6172017-06-23 14:07:04 -07001/*
2 * Copyright (C) 2017 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 Liutikase4741f3c2017-07-14 17:32:12 -070016
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070017import androidx.build.Publish
Dustin Lam94731042020-01-06 18:46:51 -080018import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Aurimas Liutikasbb85fac2017-08-24 13:32:28 -070019
Aurimas Liutikasf8b708a2017-11-02 16:07:13 -070020plugins {
Aurimas Liutikascdb9f9f2019-04-08 12:07:49 +010021 id("AndroidXPlugin")
22 id("com.android.library")
Aurimas Liutikasf8b708a2017-11-02 16:07:13 -070023 id("kotlin-android")
24}
Aurimas Liutikasbb85fac2017-08-24 13:32:28 -070025
Yigit Boyar4c739702020-12-03 22:57:50 -080026android {
27 defaultConfig {
28 multiDexEnabled true
29 }
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -070030 namespace "androidx.paging.runtime"
Yigit Boyar4c739702020-12-03 22:57:50 -080031}
32
Chris Craik9fd8e6172017-06-23 14:07:04 -070033dependencies {
Alan Viverettebdc4c862018-03-08 18:02:39 -050034 api(project(":paging:paging-common"))
Dustin Lam8f042df2019-05-31 17:58:10 -070035 // Ensure that the -ktx dependency graph mirrors the Java dependency graph
36 api(project(":paging:paging-common-ktx"))
Chris Craik968e3832018-10-10 16:25:45 -070037
Dustin Lamb771f6a2021-11-30 10:31:00 -080038 api("androidx.lifecycle:lifecycle-livedata-ktx:2.4.0")
39 api("androidx.lifecycle:lifecycle-runtime-ktx:2.4.0")
40 api("androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0")
41 api("androidx.recyclerview:recyclerview:1.2.1")
Aurimas Liutikas94ff4342021-05-04 13:02:26 -070042 api(libs.kotlinStdlib)
43 api(libs.kotlinCoroutinesAndroid)
Dustin Lamb771f6a2021-11-30 10:31:00 -080044 implementation("androidx.core:core-ktx:1.7.0")
Chris Craik9fd8e6172017-06-23 14:07:04 -070045
Chris Craikae00d0f2020-03-15 20:10:42 -070046 androidTestImplementation(project(":internal-testutils-common"))
47 androidTestImplementation(project(":internal-testutils-ktx"))
Dustin Lam30b26f52020-04-15 13:23:23 -070048 androidTestImplementation(project(":internal-testutils-paging"))
Dustin Lameed99232020-08-07 19:36:51 -070049 androidTestImplementation(projectOrArtifact(":lifecycle:lifecycle-runtime-testing"))
Aurimas Liutikas94ff4342021-05-04 13:02:26 -070050 androidTestImplementation(libs.testCore)
51 androidTestImplementation(libs.testExtJunit)
52 androidTestImplementation(libs.testRunner)
Chris Craikae00d0f2020-03-15 20:10:42 -070053 androidTestImplementation("androidx.arch.core:core-testing:2.1.0")
Aurimas Liutikas94ff4342021-05-04 13:02:26 -070054 androidTestImplementation(libs.truth)
55 androidTestImplementation(libs.kotlinTest)
56 androidTestImplementation(libs.kotlinCoroutinesTest)
57 androidTestImplementation(libs.junit)
58 androidTestImplementation(libs.multidex)
Aurimas Liutikasfc69bb62021-09-16 15:40:50 -070059
60 samples(project(":paging:paging-samples"))
Chris Craik9fd8e6172017-06-23 14:07:04 -070061}
62
Aurimas Liutikas2ad31612019-04-01 04:23:03 -070063androidx {
Chris Craik6dd27832018-01-19 10:49:19 -080064 name = "Android Paging-Runtime"
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070065 publish = Publish.SNAPSHOT_AND_RELEASE
Aurimas Liutikas7f40a7e2017-10-27 17:55:06 -070066 mavenGroup = LibraryGroups.PAGING
Aurimas Liutikasea5ee822017-11-06 12:52:28 -080067 inceptionYear = "2017"
Chris Craik6dd27832018-01-19 10:49:19 -080068 description = "Android Paging-Runtime"
Aurimas Liutikasc53db9a2020-10-08 17:22:52 -070069 legacyDisableKotlinStrictApiMode = true
Dustin Lam94731042020-01-06 18:46:51 -080070}
71
Dustin Lamc351bfc2020-03-11 20:32:42 -070072// Allow usage of Kotlin's @OptIn.
Dustin Lam94731042020-01-06 18:46:51 -080073tasks.withType(KotlinCompile).configureEach {
74 kotlinOptions {
Dustin Lamc351bfc2020-03-11 20:32:42 -070075 freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
Dustin Lam94731042020-01-06 18:46:51 -080076 }
77}