Chris Craik | 368e82c | 2018-02-12 16:40:12 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 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 | |
Dustin Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 17 | |
Aurimas Liutikas | b63ef63 | 2019-04-01 04:37:49 -0700 | [diff] [blame] | 18 | import androidx.build.AndroidXExtension |
Dustin Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 19 | import androidx.build.LibraryGroups |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 20 | import androidx.build.Publish |
Chris Craik | 1c09b585 | 2020-01-07 12:58:34 -0800 | [diff] [blame] | 21 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 22 | |
| 23 | import static androidx.build.dependencies.DependenciesKt.* |
Chris Craik | 368e82c | 2018-02-12 16:40:12 -0800 | [diff] [blame] | 24 | |
| 25 | plugins { |
Aurimas Liutikas | cdb9f9f | 2019-04-08 12:07:49 +0100 | [diff] [blame] | 26 | id("AndroidXPlugin") |
| 27 | id("com.android.library") |
Chris Craik | 368e82c | 2018-02-12 16:40:12 -0800 | [diff] [blame] | 28 | id("kotlin-android") |
| 29 | } |
| 30 | |
| 31 | dependencies { |
Chris Craik | 368e82c | 2018-02-12 16:40:12 -0800 | [diff] [blame] | 32 | api(project(":paging:paging-common")) |
Ian Lake | 64c858b | 2019-09-27 14:34:08 -0700 | [diff] [blame] | 33 | api("androidx.arch.core:core-runtime:2.1.0") |
Chris Craik | 368e82c | 2018-02-12 16:40:12 -0800 | [diff] [blame] | 34 | api(RX_JAVA) |
Dustin Lam | c88868c | 2019-05-31 22:37:48 -0700 | [diff] [blame] | 35 | implementation(KOTLIN_STDLIB) |
Chris Craik | 6f3e21c | 2019-09-20 14:37:52 -0700 | [diff] [blame] | 36 | implementation(KOTLIN_COROUTINES_RX2) |
Dustin Lam | 0699f45 | 2019-03-21 07:46:09 -0700 | [diff] [blame] | 37 | |
Chris Craik | ae00d0f | 2020-03-15 20:10:42 -0700 | [diff] [blame] | 38 | testImplementation(project(":internal-testutils-common")) |
Dustin Lam | 30b26f5 | 2020-04-15 13:23:23 -0700 | [diff] [blame] | 39 | testImplementation(project(":internal-testutils-paging")) |
Dustin Lam | 0699f45 | 2019-03-21 07:46:09 -0700 | [diff] [blame] | 40 | testImplementation(JUNIT) |
Louis Pullen-Freilich | 08e53df | 2019-10-24 20:00:35 +0100 | [diff] [blame] | 41 | testImplementation(KOTLIN_TEST) |
Dustin Lam | affd859 | 2020-06-10 14:46:15 -0700 | [diff] [blame] | 42 | testImplementation(KOTLIN_COROUTINES_TEST) |
Dustin Lam | 83f4510 | 2019-06-03 13:02:45 -0700 | [diff] [blame] | 43 | |
| 44 | androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT) |
| 45 | androidTestImplementation(ANDROIDX_TEST_CORE) |
| 46 | androidTestImplementation(ANDROIDX_TEST_RUNNER) |
Dustin Lam | 1d283ff | 2021-01-27 11:02:05 -0800 | [diff] [blame] | 47 | androidTestImplementation("androidx.arch.core:core-testing:2.1.0") |
Chris Craik | 368e82c | 2018-02-12 16:40:12 -0800 | [diff] [blame] | 48 | } |
| 49 | |
Aurimas Liutikas | 2ad3161 | 2019-04-01 04:23:03 -0700 | [diff] [blame] | 50 | androidx { |
Chris Craik | ae00d0f | 2020-03-15 20:10:42 -0700 | [diff] [blame] | 51 | name = "Android Paging-RXJava2" |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 52 | publish = Publish.SNAPSHOT_AND_RELEASE |
Chris Craik | 368e82c | 2018-02-12 16:40:12 -0800 | [diff] [blame] | 53 | mavenGroup = LibraryGroups.PAGING |
| 54 | inceptionYear = "2018" |
Chris Craik | ae00d0f | 2020-03-15 20:10:42 -0700 | [diff] [blame] | 55 | description = "Android Paging-RXJava2" |
Aurimas Liutikas | c53db9a | 2020-10-08 17:22:52 -0700 | [diff] [blame] | 56 | legacyDisableKotlinStrictApiMode = true |
Chris Craik | 368e82c | 2018-02-12 16:40:12 -0800 | [diff] [blame] | 57 | } |
Chris Craik | 1c09b585 | 2020-01-07 12:58:34 -0800 | [diff] [blame] | 58 | |
Dustin Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 59 | // Allow usage of Kotlin's @OptIn. |
Chris Craik | 1c09b585 | 2020-01-07 12:58:34 -0800 | [diff] [blame] | 60 | tasks.withType(KotlinCompile).configureEach { |
| 61 | kotlinOptions { |
Dustin Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 62 | freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"] |
Chris Craik | 1c09b585 | 2020-01-07 12:58:34 -0800 | [diff] [blame] | 63 | } |
| 64 | } |