blob: b3c7f6855e856e929b5ff6b90b7c10d57dca1532 [file] [log] [blame]
Chris Craik9fd8e6172017-06-23 14:07:04 -07001/*
2 * Copyright (C) 2017 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 */
Aurimas Liutikase4741f3c2017-07-14 17:32:12 -070016
Dustin Lam278920e2019-05-31 17:15:14 -070017
18import androidx.build.AndroidXExtension
Aurimas Liutikas526389b2018-02-27 14:01:24 -080019import androidx.build.LibraryGroups
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070020import androidx.build.Publish
Dustin Lam94731042020-01-06 18:46:51 -080021import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Aurimas Liutikasbb85fac2017-08-24 13:32:28 -070022
Dustin Lam278920e2019-05-31 17:15:14 -070023import static androidx.build.dependencies.DependenciesKt.*
24
Aurimas Liutikasf8b708a2017-11-02 16:07:13 -070025plugins {
Aurimas Liutikascdb9f9f2019-04-08 12:07:49 +010026 id("AndroidXPlugin")
27 id("com.android.library")
Aurimas Liutikasf8b708a2017-11-02 16:07:13 -070028 id("kotlin-android")
29}
Aurimas Liutikasbb85fac2017-08-24 13:32:28 -070030
Chris Craik9fd8e6172017-06-23 14:07:04 -070031dependencies {
Alan Viverettebdc4c862018-03-08 18:02:39 -050032 api(project(":paging:paging-common"))
Dustin Lam8f042df2019-05-31 17:58:10 -070033 // Ensure that the -ktx dependency graph mirrors the Java dependency graph
34 api(project(":paging:paging-common-ktx"))
Chris Craik968e3832018-10-10 16:25:45 -070035
Dustin Lama92a1602020-01-10 16:42:58 -080036 api(project(":lifecycle:lifecycle-runtime-ktx"))
37 api(project(":lifecycle:lifecycle-livedata-ktx"))
Chris Craikf9449842020-02-24 20:49:48 -080038 //api("androidx.recyclerview:recyclerview:1.1.0")
39 api(project(":recyclerview:recyclerview"))
Dustin Lam278920e2019-05-31 17:15:14 -070040 api(KOTLIN_STDLIB)
Dustin Lam6fd483d2019-09-17 10:45:36 -070041 api(KOTLIN_COROUTINES_ANDROID)
Dustin Lama92a1602020-01-10 16:42:58 -080042 implementation(project(":core:core-ktx"))
Chris Craik9fd8e6172017-06-23 14:07:04 -070043
Dustin Lam94731042020-01-06 18:46:51 -080044 androidTestImplementation project(':paging:paging-testutils')
Dustin Lame683c812019-05-13 10:33:19 -070045 androidTestImplementation project(':internal-testutils-common')
Ian Lake3901aa02019-08-22 13:06:16 -070046 androidTestImplementation project(':internal-testutils-ktx')
Ian Lake335055e2020-02-21 16:00:23 -080047 androidTestImplementation(project(":lifecycle:lifecycle-runtime-testing"))
Dustin Lam8f042df2019-05-31 17:58:10 -070048 androidTestImplementation(ANDROIDX_TEST_CORE)
Dustin Lamdc14fd02019-08-01 19:34:18 -070049 androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
Dustin Lam8f042df2019-05-31 17:58:10 -070050 androidTestImplementation(ANDROIDX_TEST_RUNNER)
Ian Lake005a9202019-09-26 16:17:25 -070051 androidTestImplementation("androidx.arch.core:core-testing:2.0.1")
Dustin Lam94731042020-01-06 18:46:51 -080052 androidTestImplementation(KOTLIN_TEST)
Dustin Lamdc14fd02019-08-01 19:34:18 -070053 androidTestImplementation(KOTLIN_COROUTINES_TEST)
Aurimas Liutikasf4ec12f2017-11-22 12:55:43 -080054 androidTestImplementation(JUNIT)
55 androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
56 androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
Dustin Lam278920e2019-05-31 17:15:14 -070057 androidTestImplementation MOCKITO_KOTLIN, {
58 exclude group: 'org.mockito' // to keep control on the mockito version
Dustin Lamdc14fd02019-08-01 19:34:18 -070059 exclude group: 'net.bytebuddy'
Dustin Lam278920e2019-05-31 17:15:14 -070060 }
Chris Craik9fd8e6172017-06-23 14:07:04 -070061}
62
Aurimas Liutikas2ad31612019-04-01 04:23:03 -070063androidx {
Chris Craik6dd27832018-01-19 10:49:19 -080064 name = "Android Paging-Runtime"
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070065 publish = Publish.SNAPSHOT_AND_RELEASE
Aurimas Liutikas7f40a7e2017-10-27 17:55:06 -070066 mavenGroup = LibraryGroups.PAGING
Aurimas Liutikasea5ee822017-11-06 12:52:28 -080067 inceptionYear = "2017"
Chris Craik6dd27832018-01-19 10:49:19 -080068 description = "Android Paging-Runtime"
Aurimas Liutikasb63ef632019-04-01 04:37:49 -070069 url = AndroidXExtension.ARCHITECTURE_URL
Dustin Lam94731042020-01-06 18:46:51 -080070}
71
Dustin Lamc351bfc2020-03-11 20:32:42 -070072// Allow usage of Kotlin's @OptIn.
Dustin Lam94731042020-01-06 18:46:51 -080073tasks.withType(KotlinCompile).configureEach {
74 kotlinOptions {
Dustin Lamc351bfc2020-03-11 20:32:42 -070075 freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
Dustin Lam94731042020-01-06 18:46:51 -080076 }
77}