[go: nahoru, domu]

blob: 4868a771ce6dbf2b409a20d35af0400c3bd3ba15 [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 Lamaffd8592020-06-10 14:46:15 -070042 testImplementation(KOTLIN_COROUTINES_TEST)
Dustin Lam83f45102019-06-03 13:02:45 -070043
44 androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
45 androidTestImplementation(ANDROIDX_TEST_CORE)
46 androidTestImplementation(ANDROIDX_TEST_RUNNER)
Dustin Lam1d283ff2021-01-27 11:02:05 -080047 androidTestImplementation("androidx.arch.core:core-testing:2.1.0")
Chris Craik368e82c2018-02-12 16:40:12 -080048}
49
Aurimas Liutikas2ad31612019-04-01 04:23:03 -070050androidx {
Chris Craikae00d0f2020-03-15 20:10:42 -070051 name = "Android Paging-RXJava2"
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070052 publish = Publish.SNAPSHOT_AND_RELEASE
Chris Craik368e82c2018-02-12 16:40:12 -080053 mavenGroup = LibraryGroups.PAGING
54 inceptionYear = "2018"
Chris Craikae00d0f2020-03-15 20:10:42 -070055 description = "Android Paging-RXJava2"
Aurimas Liutikasc53db9a2020-10-08 17:22:52 -070056 legacyDisableKotlinStrictApiMode = true
Chris Craik368e82c2018-02-12 16:40:12 -080057}
Chris Craik1c09b5852020-01-07 12:58:34 -080058
Dustin Lamc351bfc2020-03-11 20:32:42 -070059// Allow usage of Kotlin's @OptIn.
Chris Craik1c09b5852020-01-07 12:58:34 -080060tasks.withType(KotlinCompile).configureEach {
61 kotlinOptions {
Dustin Lamc351bfc2020-03-11 20:32:42 -070062 freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
Chris Craik1c09b5852020-01-07 12:58:34 -080063 }
64}