blob: 6633e5860a7e1db8a25970ccafaeed3c7ec341ba [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 Lam30b26f52020-04-15 13:23:23 -070039 testImplementation(project(":internal-testutils-paging"))
Dustin Lam0699f452019-03-21 07:46:09 -070040 testImplementation(JUNIT)
Louis Pullen-Freilich08e53df2019-10-24 20:00:35 +010041 testImplementation(KOTLIN_TEST)
Dustin Lam83f45102019-06-03 13:02:45 -070042
43 androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
44 androidTestImplementation(ANDROIDX_TEST_CORE)
45 androidTestImplementation(ANDROIDX_TEST_RUNNER)
Ian Lake005a9202019-09-26 16:17:25 -070046 androidTestImplementation("androidx.arch.core:core-testing:2.0.1")
Chris Craik368e82c2018-02-12 16:40:12 -080047}
48
Aurimas Liutikas2ad31612019-04-01 04:23:03 -070049androidx {
Chris Craikae00d0f2020-03-15 20:10:42 -070050 name = "Android Paging-RXJava2"
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070051 publish = Publish.SNAPSHOT_AND_RELEASE
Chris Craik368e82c2018-02-12 16:40:12 -080052 mavenGroup = LibraryGroups.PAGING
53 inceptionYear = "2018"
Chris Craikae00d0f2020-03-15 20:10:42 -070054 description = "Android Paging-RXJava2"
Aurimas Liutikasb63ef632019-04-01 04:37:49 -070055 url = AndroidXExtension.ARCHITECTURE_URL
Chris Craik368e82c2018-02-12 16:40:12 -080056}
Chris Craik1c09b5852020-01-07 12:58:34 -080057
Dustin Lamc351bfc2020-03-11 20:32:42 -070058// Allow usage of Kotlin's @OptIn.
Chris Craik1c09b5852020-01-07 12:58:34 -080059tasks.withType(KotlinCompile).configureEach {
60 kotlinOptions {
Dustin Lamc351bfc2020-03-11 20:32:42 -070061 freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
Chris Craik1c09b5852020-01-07 12:58:34 -080062 }
63}