Andrii Kulian | 6225ee6 | 2019-12-11 20:48:22 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2020 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 | |
Andrii Kulian | 6225ee6 | 2019-12-11 20:48:22 -0800 | [diff] [blame] | 17 | import androidx.build.Publish |
Andrii Kulian | 3f79e44 | 2021-08-12 19:52:58 -0700 | [diff] [blame] | 18 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
Andrii Kulian | 6225ee6 | 2019-12-11 20:48:22 -0800 | [diff] [blame] | 19 | |
Aurimas Liutikas | 7c91fb4 | 2020-02-28 05:43:16 +0000 | [diff] [blame] | 20 | plugins { |
| 21 | id("AndroidXPlugin") |
| 22 | id("com.android.application") |
| 23 | id("org.jetbrains.kotlin.android") |
Aurimas Liutikas | 7c91fb4 | 2020-02-28 05:43:16 +0000 | [diff] [blame] | 24 | } |
Andrii Kulian | 6225ee6 | 2019-12-11 20:48:22 -0800 | [diff] [blame] | 25 | |
| 26 | android { |
Andrii Kulian | 6225ee6 | 2019-12-11 20:48:22 -0800 | [diff] [blame] | 27 | defaultConfig { |
| 28 | applicationId "androidx.window.sample" |
| 29 | minSdkVersion 23 |
| 30 | } |
Andrii Kulian | 3f79e44 | 2021-08-12 19:52:58 -0700 | [diff] [blame] | 31 | buildFeatures { |
| 32 | viewBinding true |
| 33 | } |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame^] | 34 | namespace "androidx.window.sample" |
Andrii Kulian | 6225ee6 | 2019-12-11 20:48:22 -0800 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | dependencies { |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 38 | implementation("androidx.appcompat:appcompat:1.2.0") |
| 39 | implementation("androidx.core:core-ktx:1.3.2") |
Diego Vela | 50f5220 | 2021-07-15 15:52:51 -0700 | [diff] [blame] | 40 | implementation("androidx.activity:activity:1.2.0") |
Diego Vela | 1199854 | 2021-09-07 16:16:06 -0700 | [diff] [blame] | 41 | implementation "androidx.recyclerview:recyclerview:1.2.1" |
Aurimas Liutikas | b3483fd | 2021-06-04 16:56:37 -0700 | [diff] [blame] | 42 | api(libs.constraintLayout) |
Diego Vela | 49741c4 | 2020-09-25 13:21:42 -0700 | [diff] [blame] | 43 | // TODO(b/152245564) Conflicting dependencies cause IDE errors. |
Diego Vela | 1199854 | 2021-09-07 16:16:06 -0700 | [diff] [blame] | 44 | implementation("androidx.lifecycle:lifecycle-viewmodel:2.4.0-alpha02") |
Kenneth Ford | 03c4acf | 2021-07-09 19:54:29 +0000 | [diff] [blame] | 45 | implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.0-alpha02") |
Andrii Kulian | 3f79e44 | 2021-08-12 19:52:58 -0700 | [diff] [blame] | 46 | implementation "androidx.browser:browser:1.3.0" |
| 47 | implementation("androidx.startup:startup-runtime:1.1.0") |
Andrii Kulian | 6225ee6 | 2019-12-11 20:48:22 -0800 | [diff] [blame] | 48 | |
Andrii Kulian | 287d944 | 2020-02-24 16:49:28 +0000 | [diff] [blame] | 49 | implementation(project(":window:window")) |
Pietro Maggi | 641e9b7 | 2021-11-15 19:28:37 +0100 | [diff] [blame] | 50 | debugImplementation(libs.leakcanary) |
| 51 | |
| 52 | androidTestImplementation(libs.testCore) |
| 53 | androidTestImplementation(libs.testExtJunit) |
| 54 | androidTestImplementation(libs.testRunner) |
| 55 | androidTestImplementation(libs.testRules) |
| 56 | androidTestImplementation(libs.espressoCore, excludes.espresso) |
| 57 | androidTestImplementation(project(":window:window-testing")) |
Andrii Kulian | 6225ee6 | 2019-12-11 20:48:22 -0800 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | androidx { |
| 61 | name = "Jetpack WindowManager library samples" |
| 62 | publish = Publish.NONE |
| 63 | mavenGroup = LibraryGroups.WINDOW |
Andrii Kulian | 6225ee6 | 2019-12-11 20:48:22 -0800 | [diff] [blame] | 64 | inceptionYear = "2020" |
| 65 | description = "Demo of Jetpack WindowManager library APIs" |
| 66 | } |
Andrii Kulian | 3f79e44 | 2021-08-12 19:52:58 -0700 | [diff] [blame] | 67 | |
| 68 | // Allow usage of Kotlin's @OptIn. |
| 69 | tasks.withType(KotlinCompile).configureEach { |
| 70 | kotlinOptions { |
| 71 | freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"] |
| 72 | } |
| 73 | } |