Dustin Lam | aaafea1 | 2019-10-07 12:57:20 -0700 | [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 | 16d5a2c | 2020-06-10 15:18:16 -0700 | [diff] [blame] | 17 | |
Dustin Lam | aaafea1 | 2019-10-07 12:57:20 -0700 | [diff] [blame] | 18 | import androidx.build.AndroidXExtension |
Dustin Lam | 16d5a2c | 2020-06-10 15:18:16 -0700 | [diff] [blame] | 19 | import androidx.build.LibraryGroups |
Dustin Lam | aaafea1 | 2019-10-07 12:57:20 -0700 | [diff] [blame] | 20 | import androidx.build.Publish |
Dustin Lam | 16d5a2c | 2020-06-10 15:18:16 -0700 | [diff] [blame] | 21 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 22 | |
| 23 | import static androidx.build.dependencies.DependenciesKt.* |
Dustin Lam | aaafea1 | 2019-10-07 12:57:20 -0700 | [diff] [blame] | 24 | |
| 25 | plugins { |
| 26 | id("AndroidXPlugin") |
| 27 | id("com.android.library") |
| 28 | id("kotlin-android") |
| 29 | } |
| 30 | |
| 31 | dependencies { |
| 32 | api(project(":paging:paging-common")) |
| 33 | api(KOTLIN_STDLIB) |
Simon Schiller | a003ad0 | 2020-09-02 21:29:50 +0200 | [diff] [blame] | 34 | api(GUAVA_ANDROID) |
| 35 | implementation(KOTLIN_COROUTINES_GUAVA) |
Dustin Lam | aaafea1 | 2019-10-07 12:57:20 -0700 | [diff] [blame] | 36 | |
Chris Craik | ae00d0f | 2020-03-15 20:10:42 -0700 | [diff] [blame] | 37 | testImplementation(project(":internal-testutils-common")) |
Simon Schiller | a003ad0 | 2020-09-02 21:29:50 +0200 | [diff] [blame] | 38 | testImplementation(project(":internal-testutils-paging")) |
Dustin Lam | aaafea1 | 2019-10-07 12:57:20 -0700 | [diff] [blame] | 39 | testImplementation(JUNIT) |
| 40 | testImplementation(KOTLIN_TEST) |
Dustin Lam | 16d5a2c | 2020-06-10 15:18:16 -0700 | [diff] [blame] | 41 | testImplementation(KOTLIN_COROUTINES_TEST) |
Dustin Lam | aaafea1 | 2019-10-07 12:57:20 -0700 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | androidx { |
| 45 | name = "Android Paging Guava" |
| 46 | publish = Publish.SNAPSHOT_AND_RELEASE |
Dustin Lam | aaafea1 | 2019-10-07 12:57:20 -0700 | [diff] [blame] | 47 | mavenGroup = LibraryGroups.PAGING |
| 48 | inceptionYear = "2019" |
| 49 | description = "Android Paging Guava" |
Aurimas Liutikas | c53db9a | 2020-10-08 17:22:52 -0700 | [diff] [blame] | 50 | legacyDisableKotlinStrictApiMode = true |
Dustin Lam | aaafea1 | 2019-10-07 12:57:20 -0700 | [diff] [blame] | 51 | } |
Dustin Lam | 16d5a2c | 2020-06-10 15:18:16 -0700 | [diff] [blame] | 52 | |
| 53 | // Allow usage of Kotlin's @OptIn. |
| 54 | tasks.withType(KotlinCompile).configureEach { |
| 55 | kotlinOptions { |
| 56 | freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"] |
| 57 | } |
| 58 | } |