Diego Vela | b211c20 | 2021-05-10 15:04:01 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2021 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 | |
| 17 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 18 | |
| 19 | import static androidx.build.dependencies.DependenciesKt.* |
| 20 | import androidx.build.LibraryGroups |
| 21 | import androidx.build.LibraryType |
| 22 | import androidx.build.LibraryVersions |
| 23 | |
| 24 | plugins { |
| 25 | id("AndroidXPlugin") |
| 26 | id("com.android.library") |
| 27 | id("org.jetbrains.kotlin.android") |
| 28 | } |
| 29 | |
| 30 | android { |
| 31 | defaultConfig { |
| 32 | multiDexEnabled = true |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | dependencies { |
| 37 | api(KOTLIN_STDLIB) |
| 38 | api(project(":window:window")) |
| 39 | api(JUNIT) |
| 40 | implementation("androidx.core:core:1.3.2") |
| 41 | |
| 42 | androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT) |
| 43 | androidTestImplementation(ANDROIDX_TEST_RUNNER) |
| 44 | androidTestImplementation(ANDROIDX_TEST_RULES) |
| 45 | androidTestImplementation(KOTLIN_COROUTINES_TEST) |
| 46 | androidTestImplementation(MULTIDEX) |
| 47 | androidTestImplementation(TRUTH) |
| 48 | } |
| 49 | |
| 50 | androidx { |
| 51 | name = "WindowManager Test Library" |
| 52 | type = LibraryType.PUBLISHED_LIBRARY |
| 53 | mavenVersion = LibraryVersions.WINDOW |
| 54 | mavenGroup = LibraryGroups.WINDOW |
| 55 | inceptionYear = "2021" |
| 56 | description = "WindowManager Test Library" |
| 57 | } |
| 58 | |
| 59 | // Allow usage of Kotlin's @OptIn. |
| 60 | tasks.withType(KotlinCompile).configureEach { |
| 61 | kotlinOptions { |
| 62 | freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"] |
| 63 | } |
| 64 | } |