Jake Wharton | c57cff3 | 2018-03-23 10:52:00 -0400 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | |
Aurimas Liutikas | 2a9a199 | 2020-04-02 14:51:01 -0700 | [diff] [blame] | 17 | |
| 18 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 19 | |
Jake Wharton | c57cff3 | 2018-03-23 10:52:00 -0400 | [diff] [blame] | 20 | import static androidx.build.dependencies.DependenciesKt.* |
| 21 | import androidx.build.LibraryGroups |
| 22 | import androidx.build.LibraryVersions |
Aurimas Liutikas | b63ef63 | 2019-04-01 04:37:49 -0700 | [diff] [blame] | 23 | import androidx.build.AndroidXExtension |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 24 | import androidx.build.Publish |
Jake Wharton | c57cff3 | 2018-03-23 10:52:00 -0400 | [diff] [blame] | 25 | |
| 26 | plugins { |
Aurimas Liutikas | cdb9f9f | 2019-04-08 12:07:49 +0100 | [diff] [blame] | 27 | id("AndroidXPlugin") |
| 28 | id("com.android.library") |
Jake Wharton | c57cff3 | 2018-03-23 10:52:00 -0400 | [diff] [blame] | 29 | id("org.jetbrains.kotlin.android") |
| 30 | } |
| 31 | |
| 32 | dependencies { |
| 33 | api(project(":lifecycle:lifecycle-reactivestreams")) |
| 34 | api(KOTLIN_STDLIB) |
| 35 | |
| 36 | testImplementation(JUNIT) |
| 37 | testImplementation(RX_JAVA) |
| 38 | testImplementation(TRUTH) |
Ian Lake | 335055e | 2020-02-21 16:00:23 -0800 | [diff] [blame] | 39 | testImplementation(KOTLIN_COROUTINES_TEST) |
| 40 | testImplementation(project(":lifecycle:lifecycle-runtime-testing")) |
Ian Lake | 391dc4b | 2019-09-07 17:51:23 -0700 | [diff] [blame] | 41 | testImplementation("androidx.arch.core:core-testing:2.1.0") |
Jake Wharton | c57cff3 | 2018-03-23 10:52:00 -0400 | [diff] [blame] | 42 | } |
| 43 | |
Aurimas Liutikas | 2ad3161 | 2019-04-01 04:23:03 -0700 | [diff] [blame] | 44 | androidx { |
Jake Wharton | c57cff3 | 2018-03-23 10:52:00 -0400 | [diff] [blame] | 45 | name = "Android Lifecycle ReactiveStreams KTX" |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 46 | publish = Publish.SNAPSHOT_AND_RELEASE |
Sergey Vasilinets | 071d611 | 2018-10-04 19:32:59 +0100 | [diff] [blame] | 47 | mavenVersion = LibraryVersions.LIFECYCLE |
Jake Wharton | c57cff3 | 2018-03-23 10:52:00 -0400 | [diff] [blame] | 48 | mavenGroup = LibraryGroups.LIFECYCLE |
| 49 | inceptionYear = "2018" |
| 50 | description = "Kotlin extensions for Lifecycle ReactiveStreams" |
Jake Wharton | c57cff3 | 2018-03-23 10:52:00 -0400 | [diff] [blame] | 51 | } |
Aurimas Liutikas | 2a9a199 | 2020-04-02 14:51:01 -0700 | [diff] [blame] | 52 | |
| 53 | // Allow usage of Kotlin's @OptIn. |
| 54 | tasks.withType(KotlinCompile).configureEach { |
| 55 | kotlinOptions { |
| 56 | freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"] |
| 57 | } |
Alex Saveau | b50d500 | 2020-07-14 05:25:54 +0000 | [diff] [blame] | 58 | } |