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 | |
Dustin Lam | 278920e | 2019-05-31 17:15:14 -0700 | [diff] [blame] | 17 | |
| 18 | import androidx.build.AndroidXExtension |
Aurimas Liutikas | 526389b | 2018-02-27 14:01:24 -0800 | [diff] [blame] | 19 | import androidx.build.LibraryGroups |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 20 | import androidx.build.Publish |
Dustin Lam | 9473104 | 2020-01-06 18:46:51 -0800 | [diff] [blame] | 21 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
Aurimas Liutikas | bb85fac | 2017-08-24 13:32:28 -0700 | [diff] [blame] | 22 | |
Dustin Lam | 278920e | 2019-05-31 17:15:14 -0700 | [diff] [blame] | 23 | import static androidx.build.dependencies.DependenciesKt.* |
| 24 | |
Aurimas Liutikas | f8b708a | 2017-11-02 16:07:13 -0700 | [diff] [blame] | 25 | plugins { |
Aurimas Liutikas | cdb9f9f | 2019-04-08 12:07:49 +0100 | [diff] [blame] | 26 | id("AndroidXPlugin") |
| 27 | id("com.android.library") |
Aurimas Liutikas | f8b708a | 2017-11-02 16:07:13 -0700 | [diff] [blame] | 28 | id("kotlin-android") |
| 29 | } |
Aurimas Liutikas | bb85fac | 2017-08-24 13:32:28 -0700 | [diff] [blame] | 30 | |
Chris Craik | 9fd8e617 | 2017-06-23 14:07:04 -0700 | [diff] [blame] | 31 | dependencies { |
Alan Viverette | bdc4c86 | 2018-03-08 18:02:39 -0500 | [diff] [blame] | 32 | api(project(":paging:paging-common")) |
Dustin Lam | 8f042df | 2019-05-31 17:58:10 -0700 | [diff] [blame] | 33 | // Ensure that the -ktx dependency graph mirrors the Java dependency graph |
| 34 | api(project(":paging:paging-common-ktx")) |
Chris Craik | 968e383 | 2018-10-10 16:25:45 -0700 | [diff] [blame] | 35 | |
Dustin Lam | a92a160 | 2020-01-10 16:42:58 -0800 | [diff] [blame] | 36 | api(project(":lifecycle:lifecycle-runtime-ktx")) |
| 37 | api(project(":lifecycle:lifecycle-livedata-ktx")) |
Chris Craik | f944984 | 2020-02-24 20:49:48 -0800 | [diff] [blame] | 38 | //api("androidx.recyclerview:recyclerview:1.1.0") |
| 39 | api(project(":recyclerview:recyclerview")) |
Dustin Lam | 278920e | 2019-05-31 17:15:14 -0700 | [diff] [blame] | 40 | api(KOTLIN_STDLIB) |
Dustin Lam | 6fd483d | 2019-09-17 10:45:36 -0700 | [diff] [blame] | 41 | api(KOTLIN_COROUTINES_ANDROID) |
Dustin Lam | a92a160 | 2020-01-10 16:42:58 -0800 | [diff] [blame] | 42 | implementation(project(":core:core-ktx")) |
Chris Craik | 9fd8e617 | 2017-06-23 14:07:04 -0700 | [diff] [blame] | 43 | |
Dustin Lam | 9473104 | 2020-01-06 18:46:51 -0800 | [diff] [blame] | 44 | androidTestImplementation project(':paging:paging-testutils') |
Dustin Lam | e683c81 | 2019-05-13 10:33:19 -0700 | [diff] [blame] | 45 | androidTestImplementation project(':internal-testutils-common') |
Ian Lake | 3901aa0 | 2019-08-22 13:06:16 -0700 | [diff] [blame] | 46 | androidTestImplementation project(':internal-testutils-ktx') |
Ian Lake | 335055e | 2020-02-21 16:00:23 -0800 | [diff] [blame] | 47 | androidTestImplementation(project(":lifecycle:lifecycle-runtime-testing")) |
Dustin Lam | 8f042df | 2019-05-31 17:58:10 -0700 | [diff] [blame] | 48 | androidTestImplementation(ANDROIDX_TEST_CORE) |
Dustin Lam | dc14fd0 | 2019-08-01 19:34:18 -0700 | [diff] [blame] | 49 | androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT) |
Dustin Lam | 8f042df | 2019-05-31 17:58:10 -0700 | [diff] [blame] | 50 | androidTestImplementation(ANDROIDX_TEST_RUNNER) |
Ian Lake | 005a920 | 2019-09-26 16:17:25 -0700 | [diff] [blame] | 51 | androidTestImplementation("androidx.arch.core:core-testing:2.0.1") |
Dustin Lam | 9473104 | 2020-01-06 18:46:51 -0800 | [diff] [blame] | 52 | androidTestImplementation(KOTLIN_TEST) |
Dustin Lam | dc14fd0 | 2019-08-01 19:34:18 -0700 | [diff] [blame] | 53 | androidTestImplementation(KOTLIN_COROUTINES_TEST) |
Aurimas Liutikas | f4ec12f | 2017-11-22 12:55:43 -0800 | [diff] [blame] | 54 | androidTestImplementation(JUNIT) |
| 55 | androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker |
| 56 | androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker |
Dustin Lam | 278920e | 2019-05-31 17:15:14 -0700 | [diff] [blame] | 57 | androidTestImplementation MOCKITO_KOTLIN, { |
| 58 | exclude group: 'org.mockito' // to keep control on the mockito version |
Dustin Lam | dc14fd0 | 2019-08-01 19:34:18 -0700 | [diff] [blame] | 59 | exclude group: 'net.bytebuddy' |
Dustin Lam | 278920e | 2019-05-31 17:15:14 -0700 | [diff] [blame] | 60 | } |
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 | b63ef63 | 2019-04-01 04:37:49 -0700 | [diff] [blame] | 69 | url = AndroidXExtension.ARCHITECTURE_URL |
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 | } |