1/*
2 * Copyright 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/**
18 * This file was created using the `create_project.py` script located in the
19 * `<AndroidX root>/development/project-creator` directory.
20 *
21 * Please use that script when creating a new project, rather than copying an existing project and
22 * modifying its settings.
23 */
24import androidx.build.SoftwareType
25
26plugins {
27    id("AndroidXPlugin")
28    id("com.android.library")
29    id("org.jetbrains.kotlin.android")
30    id("AndroidXComposePlugin")
31}
32
33dependencies {
34
35    api(project(":glance:glance"))
36    api(project(":glance:glance-template"))
37    api("androidx.compose.runtime:runtime:1.1.1")
38    api("androidx.compose.ui:ui-graphics:1.1.1")
39    api("androidx.compose.ui:ui-unit:1.1.1")
40    api("androidx.wear.tiles:tiles:1.1.0")
41
42    implementation(libs.kotlinStdlib)
43    implementation(libs.kotlinCoroutinesGuava)
44    implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
45    implementation("androidx.lifecycle:lifecycle-service:2.6.1")
46
47    testImplementation(libs.testCore)
48    testImplementation(libs.testRules)
49    testImplementation(libs.testRunner)
50    testImplementation(libs.truth)
51    testImplementation(libs.junit)
52    testImplementation(libs.kotlinTest)
53    testImplementation(libs.kotlinCoroutinesTest)
54    testImplementation(libs.robolectric)
55    testImplementation(libs.kotlinReflect)
56    testImplementation(libs.mockitoCore4)
57    testImplementation(libs.mockitoKotlin4)
58    testImplementation("androidx.core:core-ktx:1.7.0")
59    testImplementation("androidx.wear.tiles:tiles-testing:1.0.0")
60
61    androidTestImplementation("androidx.core:core:1.7.0")
62    androidTestImplementation("androidx.core:core-ktx:1.7.0")
63    androidTestImplementation(project(":test:screenshot:screenshot"))
64    androidTestImplementation("androidx.wear.tiles:tiles-renderer:1.0.0")
65    androidTestImplementation(libs.testExtJunit)
66    androidTestImplementation(libs.testCore)
67    androidTestImplementation(libs.testRunner)
68    androidTestImplementation(libs.testRules)
69    androidTestImplementation(libs.kotlinTest)
70    androidTestImplementation(libs.kotlinCoroutinesTest)
71}
72
73android {
74    defaultConfig {
75        minSdk = 26
76        compileSdk = 35
77    }
78    // Use Robolectric 4.+
79    testOptions.unitTests.includeAndroidResources = true
80
81    lint {
82        // TODO(b/191286558): Remove when lint is fixed.
83        disable.add("UnsafeOptInUsageError")
84    }
85    namespace = "androidx.glance.wear.tiles"
86}
87
88androidx {
89    name = "Glance for Wear Tiles"
90    type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
91    mavenVersion = LibraryVersions.GLANCE_WEAR_TILES
92    inceptionYear = "2021"
93    description = "Glance allows developers to build layouts for Wear Tiles using a Jetpack " +
94            "Compose-style API."
95    legacyDisableKotlinStrictApiMode = true
96    addGoldenImageAssets()
97}
98