[go: nahoru, domu]

blob: cd16daa75b9b58eea804888fd13b975efd9af1b8 [file] [log] [blame]
Jake Whartonc57cff32018-03-23 10:52:00 -04001/*
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 Liutikas2a9a1992020-04-02 14:51:01 -070017
18import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
19
Jake Whartonc57cff32018-03-23 10:52:00 -040020import static androidx.build.dependencies.DependenciesKt.*
21import androidx.build.LibraryGroups
22import androidx.build.LibraryVersions
Aurimas Liutikasb63ef632019-04-01 04:37:49 -070023import androidx.build.AndroidXExtension
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070024import androidx.build.Publish
Jake Whartonc57cff32018-03-23 10:52:00 -040025
26plugins {
Aurimas Liutikascdb9f9f2019-04-08 12:07:49 +010027 id("AndroidXPlugin")
28 id("com.android.library")
Jake Whartonc57cff32018-03-23 10:52:00 -040029 id("org.jetbrains.kotlin.android")
30}
31
32dependencies {
33 api(project(":lifecycle:lifecycle-reactivestreams"))
34 api(KOTLIN_STDLIB)
35
36 testImplementation(JUNIT)
37 testImplementation(RX_JAVA)
38 testImplementation(TRUTH)
Ian Lake335055e2020-02-21 16:00:23 -080039 testImplementation(KOTLIN_COROUTINES_TEST)
40 testImplementation(project(":lifecycle:lifecycle-runtime-testing"))
Ian Lake391dc4b2019-09-07 17:51:23 -070041 testImplementation("androidx.arch.core:core-testing:2.1.0")
Jake Whartonc57cff32018-03-23 10:52:00 -040042}
43
Aurimas Liutikas2ad31612019-04-01 04:23:03 -070044androidx {
Jake Whartonc57cff32018-03-23 10:52:00 -040045 name = "Android Lifecycle ReactiveStreams KTX"
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070046 publish = Publish.SNAPSHOT_AND_RELEASE
Sergey Vasilinets071d6112018-10-04 19:32:59 +010047 mavenVersion = LibraryVersions.LIFECYCLE
Jake Whartonc57cff32018-03-23 10:52:00 -040048 mavenGroup = LibraryGroups.LIFECYCLE
49 inceptionYear = "2018"
50 description = "Kotlin extensions for Lifecycle ReactiveStreams"
Jake Whartonc57cff32018-03-23 10:52:00 -040051}
Aurimas Liutikas2a9a1992020-04-02 14:51:01 -070052
53// Allow usage of Kotlin's @OptIn.
54tasks.withType(KotlinCompile).configureEach {
55 kotlinOptions {
56 freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
57 }
Alex Saveaub50d5002020-07-14 05:25:54 +000058}