blob: bfc539d13998b443300e22e404a2aaf5c2a040f2 [file] [log] [blame]
Chris Craik368e82c2018-02-12 16:40:12 -08001/*
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 Lamc351bfc2020-03-11 20:32:42 -070017
Aurimas Liutikasb63ef632019-04-01 04:37:49 -070018import androidx.build.AndroidXExtension
Dustin Lamc351bfc2020-03-11 20:32:42 -070019import androidx.build.LibraryGroups
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070020import androidx.build.Publish
Chris Craik1c09b5852020-01-07 12:58:34 -080021import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22
23import static androidx.build.dependencies.DependenciesKt.*
Chris Craik368e82c2018-02-12 16:40:12 -080024
25plugins {
Aurimas Liutikascdb9f9f2019-04-08 12:07:49 +010026 id("AndroidXPlugin")
27 id("com.android.library")
Chris Craik368e82c2018-02-12 16:40:12 -080028 id("kotlin-android")
29}
30
31dependencies {
Chris Craik368e82c2018-02-12 16:40:12 -080032 api(project(":paging:paging-common"))
Ian Lake64c858b2019-09-27 14:34:08 -070033 api("androidx.arch.core:core-runtime:2.1.0")
Chris Craik368e82c2018-02-12 16:40:12 -080034 api(RX_JAVA)
Dustin Lamc88868c2019-05-31 22:37:48 -070035 implementation(KOTLIN_STDLIB)
Chris Craik6f3e21c2019-09-20 14:37:52 -070036 implementation(KOTLIN_COROUTINES_RX2)
Dustin Lam0699f452019-03-21 07:46:09 -070037
Chris Craikae00d0f2020-03-15 20:10:42 -070038 testImplementation(project(":internal-testutils-common"))
Dustin Lam0699f452019-03-21 07:46:09 -070039 testImplementation(JUNIT)
Louis Pullen-Freilich08e53df2019-10-24 20:00:35 +010040 testImplementation(KOTLIN_TEST)
Dustin Lam83f45102019-06-03 13:02:45 -070041
42 androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
43 androidTestImplementation(ANDROIDX_TEST_CORE)
44 androidTestImplementation(ANDROIDX_TEST_RUNNER)
Ian Lake005a9202019-09-26 16:17:25 -070045 androidTestImplementation("androidx.arch.core:core-testing:2.0.1")
Chris Craik368e82c2018-02-12 16:40:12 -080046}
47
Aurimas Liutikas2ad31612019-04-01 04:23:03 -070048androidx {
Chris Craikae00d0f2020-03-15 20:10:42 -070049 name = "Android Paging-RXJava2"
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070050 publish = Publish.SNAPSHOT_AND_RELEASE
Chris Craik368e82c2018-02-12 16:40:12 -080051 mavenGroup = LibraryGroups.PAGING
52 inceptionYear = "2018"
Chris Craikae00d0f2020-03-15 20:10:42 -070053 description = "Android Paging-RXJava2"
Aurimas Liutikasb63ef632019-04-01 04:37:49 -070054 url = AndroidXExtension.ARCHITECTURE_URL
Chris Craik368e82c2018-02-12 16:40:12 -080055}
Chris Craik1c09b5852020-01-07 12:58:34 -080056
Dustin Lamc351bfc2020-03-11 20:32:42 -070057// Allow usage of Kotlin's @OptIn.
Chris Craik1c09b5852020-01-07 12:58:34 -080058tasks.withType(KotlinCompile).configureEach {
59 kotlinOptions {
Dustin Lamc351bfc2020-03-11 20:32:42 -070060 freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
Chris Craik1c09b5852020-01-07 12:58:34 -080061 }
62}