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 | |
Diego Vela | b211c20 | 2021-05-10 15:04:01 -0700 | [diff] [blame] | 17 | import androidx.build.LibraryType |
Aurimas Liutikas | b3483fd | 2021-06-04 16:56:37 -0700 | [diff] [blame] | 18 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
Diego Vela | b211c20 | 2021-05-10 15:04:01 -0700 | [diff] [blame] | 19 | |
| 20 | plugins { |
| 21 | id("AndroidXPlugin") |
| 22 | id("com.android.library") |
| 23 | id("org.jetbrains.kotlin.android") |
| 24 | } |
| 25 | |
| 26 | android { |
| 27 | defaultConfig { |
| 28 | multiDexEnabled = true |
| 29 | } |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 30 | namespace "androidx.window.testing" |
Diego Vela | b211c20 | 2021-05-10 15:04:01 -0700 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | dependencies { |
Aurimas Liutikas | b3483fd | 2021-06-04 16:56:37 -0700 | [diff] [blame] | 34 | api(libs.kotlinStdlib) |
Diego Vela | b211c20 | 2021-05-10 15:04:01 -0700 | [diff] [blame] | 35 | api(project(":window:window")) |
Aurimas Liutikas | b3483fd | 2021-06-04 16:56:37 -0700 | [diff] [blame] | 36 | api(libs.junit) |
Diego Vela | b211c20 | 2021-05-10 15:04:01 -0700 | [diff] [blame] | 37 | implementation("androidx.core:core:1.3.2") |
| 38 | |
Jeremy Woods | fa78895 | 2021-07-29 16:12:29 -0700 | [diff] [blame] | 39 | androidTestImplementation(libs.testCore) |
Aurimas Liutikas | b3483fd | 2021-06-04 16:56:37 -0700 | [diff] [blame] | 40 | androidTestImplementation(libs.testExtJunit) |
| 41 | androidTestImplementation(libs.testRunner) |
| 42 | androidTestImplementation(libs.testRules) |
| 43 | androidTestImplementation(libs.kotlinCoroutinesTest) |
| 44 | androidTestImplementation(libs.multidex) |
| 45 | androidTestImplementation(libs.truth) |
Diego Vela | b211c20 | 2021-05-10 15:04:01 -0700 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | androidx { |
| 49 | name = "WindowManager Test Library" |
Jelle Fresen | 4a13c56 | 2021-11-26 16:50:44 +0000 | [diff] [blame] | 50 | type = LibraryType.PUBLISHED_TEST_LIBRARY |
Diego Vela | b211c20 | 2021-05-10 15:04:01 -0700 | [diff] [blame] | 51 | mavenGroup = LibraryGroups.WINDOW |
| 52 | inceptionYear = "2021" |
| 53 | description = "WindowManager Test Library" |
| 54 | } |
| 55 | |
| 56 | // Allow usage of Kotlin's @OptIn. |
| 57 | tasks.withType(KotlinCompile).configureEach { |
| 58 | kotlinOptions { |
Jim Sproch | bcbd33a | 2022-01-12 14:45:37 -0800 | [diff] [blame] | 59 | freeCompilerArgs += ["-opt-in=kotlin.RequiresOptIn"] |
Diego Vela | b211c20 | 2021-05-10 15:04:01 -0700 | [diff] [blame] | 60 | } |
| 61 | } |