Sergey Vasilinets | afeb0b7 | 2018-09-28 11:35:47 +0100 | [diff] [blame] | 1 | /* |
| 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 Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 17 | |
| 18 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 19 | |
Sergey Vasilinets | afeb0b7 | 2018-09-28 11:35:47 +0100 | [diff] [blame] | 20 | import static androidx.build.dependencies.DependenciesKt.* |
| 21 | import androidx.build.LibraryGroups |
| 22 | import androidx.build.LibraryVersions |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 23 | import androidx.build.Publish |
Sergey Vasilinets | afeb0b7 | 2018-09-28 11:35:47 +0100 | [diff] [blame] | 24 | |
| 25 | plugins { |
Aurimas Liutikas | cdb9f9f | 2019-04-08 12:07:49 +0100 | [diff] [blame] | 26 | id("AndroidXPlugin") |
| 27 | id("com.android.library") |
Sergey Vasilinets | afeb0b7 | 2018-09-28 11:35:47 +0100 | [diff] [blame] | 28 | id("org.jetbrains.kotlin.android") |
| 29 | } |
| 30 | |
Dustin Lam | c351bfc | 2020-03-11 20:32:42 -0700 | [diff] [blame] | 31 | // Allow usage of Kotlin's @OptIn. |
| 32 | tasks.withType(KotlinCompile).configureEach { |
| 33 | kotlinOptions { |
| 34 | freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"] |
| 35 | } |
Aurimas Liutikas | f14b628 | 2019-06-11 13:52:10 -0700 | [diff] [blame] | 36 | } |
| 37 | |
Sergey Vasilinets | afeb0b7 | 2018-09-28 11:35:47 +0100 | [diff] [blame] | 38 | dependencies { |
| 39 | api(project(":lifecycle:lifecycle-livedata")) |
| 40 | api(project(":lifecycle:lifecycle-livedata-core-ktx")) |
| 41 | api(KOTLIN_STDLIB) |
Daniel Santiago Rivera | c2b6461 | 2019-08-23 08:51:05 -0700 | [diff] [blame] | 42 | api(KOTLIN_COROUTINES_CORE) |
Ian Lake | 335055e | 2020-02-21 16:00:23 -0800 | [diff] [blame] | 43 | testImplementation(project(":lifecycle:lifecycle-runtime-testing")) |
Ian Lake | 391dc4b | 2019-09-07 17:51:23 -0700 | [diff] [blame] | 44 | testImplementation("androidx.arch.core:core-testing:2.1.0") |
Sergey Vasilinets | afeb0b7 | 2018-09-28 11:35:47 +0100 | [diff] [blame] | 45 | testImplementation(JUNIT) |
| 46 | testImplementation(TRUTH) |
Daniel Santiago Rivera | c2b6461 | 2019-08-23 08:51:05 -0700 | [diff] [blame] | 47 | testImplementation(KOTLIN_COROUTINES_TEST) |
Yigit Boyar | 4a302c8 | 2020-06-03 16:53:27 -0700 | [diff] [blame] | 48 | 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 Vasilinets | afeb0b7 | 2018-09-28 11:35:47 +0100 | [diff] [blame] | 54 | } |
| 55 | |
Aurimas Liutikas | 2ad3161 | 2019-04-01 04:23:03 -0700 | [diff] [blame] | 56 | androidx { |
Sergey Vasilinets | afeb0b7 | 2018-09-28 11:35:47 +0100 | [diff] [blame] | 57 | name = "LiveData Kotlin Extensions" |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 58 | publish = Publish.SNAPSHOT_AND_RELEASE |
Sergey Vasilinets | 071d611 | 2018-10-04 19:32:59 +0100 | [diff] [blame] | 59 | mavenVersion = LibraryVersions.LIFECYCLE |
Sergey Vasilinets | afeb0b7 | 2018-09-28 11:35:47 +0100 | [diff] [blame] | 60 | mavenGroup = LibraryGroups.LIFECYCLE |
| 61 | inceptionYear = "2018" |
| 62 | description = "Kotlin extensions for 'livedata' artifact" |
Sergey Vasilinets | afeb0b7 | 2018-09-28 11:35:47 +0100 | [diff] [blame] | 63 | } |