blob: 1b3060c14b4f9e857ab2982da96c3405809da0ab [file] [log] [blame]
Andrii Kulian6225ee62019-12-11 20:48:22 -08001/*
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 Kulian6225ee62019-12-11 20:48:22 -080017import androidx.build.Publish
Andrii Kulian3f79e442021-08-12 19:52:58 -070018import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Andrii Kulian6225ee62019-12-11 20:48:22 -080019
Aurimas Liutikas7c91fb42020-02-28 05:43:16 +000020plugins {
21 id("AndroidXPlugin")
22 id("com.android.application")
23 id("org.jetbrains.kotlin.android")
Aurimas Liutikas7c91fb42020-02-28 05:43:16 +000024}
Andrii Kulian6225ee62019-12-11 20:48:22 -080025
26android {
Andrii Kulian6225ee62019-12-11 20:48:22 -080027 defaultConfig {
28 applicationId "androidx.window.sample"
29 minSdkVersion 23
30 }
Andrii Kulian3f79e442021-08-12 19:52:58 -070031 buildFeatures {
32 viewBinding true
33 }
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -070034 namespace "androidx.window.sample"
Andrii Kulian6225ee62019-12-11 20:48:22 -080035}
36
37dependencies {
Jim Sproch9e38b4f2021-01-06 14:21:06 -080038 implementation("androidx.appcompat:appcompat:1.2.0")
39 implementation("androidx.core:core-ktx:1.3.2")
Diego Vela50f52202021-07-15 15:52:51 -070040 implementation("androidx.activity:activity:1.2.0")
Diego Vela11998542021-09-07 16:16:06 -070041 implementation "androidx.recyclerview:recyclerview:1.2.1"
Aurimas Liutikasb3483fd2021-06-04 16:56:37 -070042 api(libs.constraintLayout)
Diego Vela49741c42020-09-25 13:21:42 -070043 // TODO(b/152245564) Conflicting dependencies cause IDE errors.
Diego Vela11998542021-09-07 16:16:06 -070044 implementation("androidx.lifecycle:lifecycle-viewmodel:2.4.0-alpha02")
Kenneth Ford03c4acf2021-07-09 19:54:29 +000045 implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.0-alpha02")
Andrii Kulian3f79e442021-08-12 19:52:58 -070046 implementation "androidx.browser:browser:1.3.0"
47 implementation("androidx.startup:startup-runtime:1.1.0")
Andrii Kulian6225ee62019-12-11 20:48:22 -080048
Andrii Kulian287d9442020-02-24 16:49:28 +000049 implementation(project(":window:window"))
Pietro Maggi641e9b72021-11-15 19:28:37 +010050 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 Kulian6225ee62019-12-11 20:48:22 -080058}
59
60androidx {
61 name = "Jetpack WindowManager library samples"
62 publish = Publish.NONE
63 mavenGroup = LibraryGroups.WINDOW
Andrii Kulian6225ee62019-12-11 20:48:22 -080064 inceptionYear = "2020"
65 description = "Demo of Jetpack WindowManager library APIs"
66}
Andrii Kulian3f79e442021-08-12 19:52:58 -070067
68// Allow usage of Kotlin's @OptIn.
69tasks.withType(KotlinCompile).configureEach {
70 kotlinOptions {
71 freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
72 }
73}