Chris Craik | 9fd8e617 | 2017-06-23 14:07:04 -0700 | [diff] [blame] | 1 | /* |
| 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 Liutikas | e4741f3c | 2017-07-14 17:32:12 -0700 | [diff] [blame] | 16 | |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 17 | import androidx.build.Publish |
Dustin Lam | 9473104 | 2020-01-06 18:46:51 -0800 | [diff] [blame] | 18 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
Aurimas Liutikas | bb85fac | 2017-08-24 13:32:28 -0700 | [diff] [blame] | 19 | |
Aurimas Liutikas | f8b708a | 2017-11-02 16:07:13 -0700 | [diff] [blame] | 20 | plugins { |
Aurimas Liutikas | cdb9f9f | 2019-04-08 12:07:49 +0100 | [diff] [blame] | 21 | id("AndroidXPlugin") |
| 22 | id("com.android.library") |
Aurimas Liutikas | f8b708a | 2017-11-02 16:07:13 -0700 | [diff] [blame] | 23 | id("kotlin-android") |
| 24 | } |
Aurimas Liutikas | bb85fac | 2017-08-24 13:32:28 -0700 | [diff] [blame] | 25 | |
Yigit Boyar | 4c73970 | 2020-12-03 22:57:50 -0800 | [diff] [blame] | 26 | android { |
| 27 | defaultConfig { |
| 28 | multiDexEnabled true |
| 29 | } |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame^] | 30 | namespace "androidx.paging.runtime" |
Yigit Boyar | 4c73970 | 2020-12-03 22:57:50 -0800 | [diff] [blame] | 31 | } |
| 32 | |
Chris Craik | 9fd8e617 | 2017-06-23 14:07:04 -0700 | [diff] [blame] | 33 | dependencies { |
Alan Viverette | bdc4c86 | 2018-03-08 18:02:39 -0500 | [diff] [blame] | 34 | api(project(":paging:paging-common")) |
Dustin Lam | 8f042df | 2019-05-31 17:58:10 -0700 | [diff] [blame] | 35 | // Ensure that the -ktx dependency graph mirrors the Java dependency graph |
| 36 | api(project(":paging:paging-common-ktx")) |
Chris Craik | 968e383 | 2018-10-10 16:25:45 -0700 | [diff] [blame] | 37 | |
Dustin Lam | b771f6a | 2021-11-30 10:31:00 -0800 | [diff] [blame] | 38 | 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 Liutikas | 94ff434 | 2021-05-04 13:02:26 -0700 | [diff] [blame] | 42 | api(libs.kotlinStdlib) |
| 43 | api(libs.kotlinCoroutinesAndroid) |
Dustin Lam | b771f6a | 2021-11-30 10:31:00 -0800 | [diff] [blame] | 44 | implementation("androidx.core:core-ktx:1.7.0") |
Chris Craik | 9fd8e617 | 2017-06-23 14:07:04 -0700 | [diff] [blame] | 45 | |
Chris Craik | ae00d0f | 2020-03-15 20:10:42 -0700 | [diff] [blame] | 46 | androidTestImplementation(project(":internal-testutils-common")) |
| 47 | androidTestImplementation(project(":internal-testutils-ktx")) |
Dustin Lam | 30b26f5 | 2020-04-15 13:23:23 -0700 | [diff] [blame] | 48 | androidTestImplementation(project(":internal-testutils-paging")) |
Dustin Lam | eed9923 | 2020-08-07 19:36:51 -0700 | [diff] [blame] | 49 | androidTestImplementation(projectOrArtifact(":lifecycle:lifecycle-runtime-testing")) |
Aurimas Liutikas | 94ff434 | 2021-05-04 13:02:26 -0700 | [diff] [blame] | 50 | androidTestImplementation(libs.testCore) |
| 51 | androidTestImplementation(libs.testExtJunit) |
| 52 | androidTestImplementation(libs.testRunner) |
Chris Craik | ae00d0f | 2020-03-15 20:10:42 -0700 | [diff] [blame] | 53 | androidTestImplementation("androidx.arch.core:core-testing:2.1.0") |
Aurimas Liutikas | 94ff434 | 2021-05-04 13:02:26 -0700 | [diff] [blame] | 54 | androidTestImplementation(libs.truth) |
| 55 | androidTestImplementation(libs.kotlinTest) |
| 56 | androidTestImplementation(libs.kotlinCoroutinesTest) |
| 57 | androidTestImplementation(libs.junit) |
| 58 | androidTestImplementation(libs.multidex) |
Aurimas Liutikas | fc69bb6 | 2021-09-16 15:40:50 -0700 | [diff] [blame] | 59 | |
| 60 | samples(project(":paging:paging-samples")) |
Chris Craik | 9fd8e617 | 2017-06-23 14:07:04 -0700 | [diff] [blame] | 61 | } |
| 62 | |
Aurimas Liutikas | 2ad3161 | 2019-04-01 04:23:03 -0700 | [diff] [blame] | 63 | androidx { |
Chris Craik | 6dd2783 | 2018-01-19 10:49:19 -0800 | [diff] [blame] | 64 | name = "Android Paging-Runtime" |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 65 | publish = Publish.SNAPSHOT_AND_RELEASE |
Aurimas Liutikas | 7f40a7e | 2017-10-27 17:55:06 -0700 | [diff] [blame] | 66 | mavenGroup = LibraryGroups.PAGING |
Aurimas Liutikas | ea5ee82 | 2017-11-06 12:52:28 -0800 | [diff] [blame] | 67 | inceptionYear = "2017" |
Chris Craik | 6dd2783 | 2018-01-19 10:49:19 -0800 | [diff] [blame] | 68 | description = "Android Paging-Runtime" |
Aurimas Liutikas | c53db9a | 2020-10-08 17:22:52 -0700 | [diff] [blame] | 69 | legacyDisableKotlinStrictApiMode = true |
Dustin Lam | 9473104 | 2020-01-06 18:46:51 -0800 | [diff] [blame] | 70 | } |
| 71 | |
Dustin Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 72 | // Allow usage of Kotlin's @OptIn. |
Dustin Lam | 9473104 | 2020-01-06 18:46:51 -0800 | [diff] [blame] | 73 | tasks.withType(KotlinCompile).configureEach { |
| 74 | kotlinOptions { |
Dustin Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 75 | freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"] |
Dustin Lam | 9473104 | 2020-01-06 18:46:51 -0800 | [diff] [blame] | 76 | } |
| 77 | } |