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 | 0699f45 | 2019-03-21 07:46:09 -0700 | [diff] [blame] | 39 | testImplementation(JUNIT) |
Louis Pullen-Freilich | 08e53df | 2019-10-24 20:00:35 +0100 | [diff] [blame] | 40 | testImplementation(KOTLIN_TEST) |
Dustin Lam | 83f4510 | 2019-06-03 13:02:45 -0700 | [diff] [blame] | 41 | |
| 42 | androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT) |
| 43 | androidTestImplementation(ANDROIDX_TEST_CORE) |
| 44 | androidTestImplementation(ANDROIDX_TEST_RUNNER) |
Ian Lake | 005a920 | 2019-09-26 16:17:25 -0700 | [diff] [blame] | 45 | androidTestImplementation("androidx.arch.core:core-testing:2.0.1") |
Chris Craik | 368e82c | 2018-02-12 16:40:12 -0800 | [diff] [blame] | 46 | } |
| 47 | |
Aurimas Liutikas | 2ad3161 | 2019-04-01 04:23:03 -0700 | [diff] [blame] | 48 | androidx { |
Chris Craik | ae00d0f | 2020-03-15 20:10:42 -0700 | [diff] [blame^] | 49 | name = "Android Paging-RXJava2" |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 50 | publish = Publish.SNAPSHOT_AND_RELEASE |
Chris Craik | 368e82c | 2018-02-12 16:40:12 -0800 | [diff] [blame] | 51 | mavenGroup = LibraryGroups.PAGING |
| 52 | inceptionYear = "2018" |
Chris Craik | ae00d0f | 2020-03-15 20:10:42 -0700 | [diff] [blame^] | 53 | description = "Android Paging-RXJava2" |
Aurimas Liutikas | b63ef63 | 2019-04-01 04:37:49 -0700 | [diff] [blame] | 54 | url = AndroidXExtension.ARCHITECTURE_URL |
Chris Craik | 368e82c | 2018-02-12 16:40:12 -0800 | [diff] [blame] | 55 | } |
Chris Craik | 1c09b585 | 2020-01-07 12:58:34 -0800 | [diff] [blame] | 56 | |
Dustin Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 57 | // Allow usage of Kotlin's @OptIn. |
Chris Craik | 1c09b585 | 2020-01-07 12:58:34 -0800 | [diff] [blame] | 58 | tasks.withType(KotlinCompile).configureEach { |
| 59 | kotlinOptions { |
Dustin Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 60 | freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"] |
Chris Craik | 1c09b585 | 2020-01-07 12:58:34 -0800 | [diff] [blame] | 61 | } |
| 62 | } |