[go: nahoru, domu]

blob: de01694f35df13ec3e0b9aa39e7a02cb488310fe [file] [log] [blame]
Sergey Vasilinetsafeb0b72018-09-28 11:35:47 +01001/*
2 * Copyright 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
18import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
19
Sergey Vasilinetsafeb0b72018-09-28 11:35:47 +010020import static androidx.build.dependencies.DependenciesKt.*
21import androidx.build.LibraryGroups
22import androidx.build.LibraryVersions
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070023import androidx.build.Publish
Sergey Vasilinetsafeb0b72018-09-28 11:35:47 +010024
25plugins {
Aurimas Liutikascdb9f9f2019-04-08 12:07:49 +010026 id("AndroidXPlugin")
27 id("com.android.library")
Sergey Vasilinetsafeb0b72018-09-28 11:35:47 +010028 id("org.jetbrains.kotlin.android")
29}
30
Dustin Lamc351bfc2020-03-11 20:32:42 -070031// Allow usage of Kotlin's @OptIn.
32tasks.withType(KotlinCompile).configureEach {
33 kotlinOptions {
34 freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
35 }
Aurimas Liutikasf14b6282019-06-11 13:52:10 -070036}
37
Sergey Vasilinetsafeb0b72018-09-28 11:35:47 +010038dependencies {
39 api(project(":lifecycle:lifecycle-livedata"))
40 api(project(":lifecycle:lifecycle-livedata-core-ktx"))
41 api(KOTLIN_STDLIB)
Daniel Santiago Riverac2b64612019-08-23 08:51:05 -070042 api(KOTLIN_COROUTINES_CORE)
Ian Lake335055e2020-02-21 16:00:23 -080043 testImplementation(project(":lifecycle:lifecycle-runtime-testing"))
Ian Lake391dc4b2019-09-07 17:51:23 -070044 testImplementation("androidx.arch.core:core-testing:2.1.0")
Sergey Vasilinetsafeb0b72018-09-28 11:35:47 +010045 testImplementation(JUNIT)
46 testImplementation(TRUTH)
Daniel Santiago Riverac2b64612019-08-23 08:51:05 -070047 testImplementation(KOTLIN_COROUTINES_TEST)
Yigit Boyar4a302c82020-06-03 16:53:27 -070048 androidTestImplementation(TRUTH)
49 androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
50 androidTestImplementation(ANDROIDX_TEST_CORE)
51 androidTestImplementation(ANDROIDX_TEST_RUNNER)
52 androidTestImplementation(KOTLIN_COROUTINES_TEST)
53 androidTestImplementation(KOTLIN_COROUTINES_ANDROID)
Sergey Vasilinetsafeb0b72018-09-28 11:35:47 +010054}
55
Aurimas Liutikas2ad31612019-04-01 04:23:03 -070056androidx {
Sergey Vasilinetsafeb0b72018-09-28 11:35:47 +010057 name = "LiveData Kotlin Extensions"
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070058 publish = Publish.SNAPSHOT_AND_RELEASE
Sergey Vasilinets071d6112018-10-04 19:32:59 +010059 mavenVersion = LibraryVersions.LIFECYCLE
Sergey Vasilinetsafeb0b72018-09-28 11:35:47 +010060 mavenGroup = LibraryGroups.LIFECYCLE
61 inceptionYear = "2018"
62 description = "Kotlin extensions for 'livedata' artifact"
Sergey Vasilinetsafeb0b72018-09-28 11:35:47 +010063}