Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 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 | |
Tiem Song | ee0da74 | 2024-01-03 14:08:46 -0800 | [diff] [blame] | 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 | */ |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 24 | import androidx.build.LibraryType |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 25 | |
| 26 | plugins { |
| 27 | id("AndroidXPlugin") |
| 28 | id("com.android.library") |
Aurimas Liutikas | 6a05875 | 2023-05-10 15:03:57 -0700 | [diff] [blame] | 29 | id("org.jetbrains.kotlin.android") |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 30 | id("AndroidXComposePlugin") |
| 31 | } |
| 32 | |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 33 | dependencies { |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 34 | |
| 35 | api(project(":glance:glance")) |
Zoe Page | be95065 | 2023-03-30 01:01:12 +0000 | [diff] [blame] | 36 | api(project(":glance:glance-template")) |
Nick Anthony | a2df032 | 2022-11-10 11:23:30 -0500 | [diff] [blame] | 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") |
Shamali P | 280b65f | 2023-01-24 16:51:51 +0000 | [diff] [blame] | 40 | api("androidx.wear.tiles:tiles:1.1.0") |
Jamie Garside | 5f2669d | 2021-08-27 15:19:00 +0100 | [diff] [blame] | 41 | |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 42 | implementation(libs.kotlinStdlib) |
Jamie Garside | 412262d | 2021-08-24 16:35:00 +0100 | [diff] [blame] | 43 | implementation(libs.kotlinCoroutinesGuava) |
Jeremy Woods | 460974ee | 2023-04-24 17:13:39 +0000 | [diff] [blame] | 44 | implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1") |
| 45 | implementation("androidx.lifecycle:lifecycle-service:2.6.1") |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 46 | |
Jamie Garside | e23e15e | 2021-09-13 18:56:05 +0100 | [diff] [blame] | 47 | testImplementation(libs.testCore) |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 48 | testImplementation(libs.testRules) |
| 49 | testImplementation(libs.testRunner) |
Jamie Garside | 5cf6ca4 | 2021-08-17 14:53:38 +0100 | [diff] [blame] | 50 | testImplementation(libs.truth) |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 51 | testImplementation(libs.junit) |
Cyrus Boadway | 46a3f8b | 2021-09-23 13:27:47 +0100 | [diff] [blame] | 52 | testImplementation(libs.kotlinTest) |
Jamie Garside | 5cf6ca4 | 2021-08-17 14:53:38 +0100 | [diff] [blame] | 53 | testImplementation(libs.kotlinCoroutinesTest) |
Jamie Garside | 412262d | 2021-08-24 16:35:00 +0100 | [diff] [blame] | 54 | testImplementation(libs.robolectric) |
Pierre Barbier de Reuille | 6c7e2cc | 2021-09-29 20:58:03 +0100 | [diff] [blame] | 55 | testImplementation(libs.kotlinReflect) |
Aurimas Liutikas | 759f968 | 2022-10-05 07:01:37 -0700 | [diff] [blame] | 56 | testImplementation(libs.mockitoCore4) |
| 57 | testImplementation(libs.mockitoKotlin4) |
Xiangyin Ma | 1d07c03 | 2022-01-06 19:13:12 +0000 | [diff] [blame] | 58 | testImplementation("androidx.core:core-ktx:1.7.0") |
| 59 | testImplementation("androidx.wear.tiles:tiles-testing:1.0.0") |
Jamie Garside | ff5feab | 2021-08-20 17:33:43 +0100 | [diff] [blame] | 60 | |
Alan Viverette | c474c5b | 2021-10-28 16:32:52 -0400 | [diff] [blame] | 61 | androidTestImplementation("androidx.core:core:1.7.0") |
Xiangyin Ma | 1d07c03 | 2022-01-06 19:13:12 +0000 | [diff] [blame] | 62 | androidTestImplementation("androidx.core:core-ktx:1.7.0") |
Jamie Garside | ff5feab | 2021-08-20 17:33:43 +0100 | [diff] [blame] | 63 | androidTestImplementation(project(":test:screenshot:screenshot")) |
Xiangyin Ma | 1d07c03 | 2022-01-06 19:13:12 +0000 | [diff] [blame] | 64 | androidTestImplementation("androidx.wear.tiles:tiles-renderer:1.0.0") |
Jamie Garside | ff5feab | 2021-08-20 17:33:43 +0100 | [diff] [blame] | 65 | androidTestImplementation(libs.testExtJunit) |
| 66 | androidTestImplementation(libs.testCore) |
| 67 | androidTestImplementation(libs.testRunner) |
| 68 | androidTestImplementation(libs.testRules) |
Cyrus Boadway | 46a3f8b | 2021-09-23 13:27:47 +0100 | [diff] [blame] | 69 | androidTestImplementation(libs.kotlinTest) |
Jamie Garside | ff5feab | 2021-08-20 17:33:43 +0100 | [diff] [blame] | 70 | androidTestImplementation(libs.kotlinCoroutinesTest) |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 71 | } |
| 72 | |
| 73 | android { |
| 74 | defaultConfig { |
Aurimas Liutikas | 7795282 | 2024-12-04 18:00:17 -0800 | [diff] [blame] | 75 | minSdk = 26 |
| 76 | compileSdk = 35 |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 77 | } |
| 78 | // Use Robolectric 4.+ |
| 79 | testOptions.unitTests.includeAndroidResources = true |
Jamie Garside | a4846a7 | 2021-08-20 18:28:46 +0100 | [diff] [blame] | 80 | |
| 81 | lintOptions { |
| 82 | // TODO(b/191286558): Remove when lint is fixed. |
| 83 | disable "UnsafeOptInUsageError", "UnsafeOptInUsageWarning" |
Aurimas Liutikas | 7765196 | 2022-10-07 04:52:20 -0700 | [diff] [blame] | 84 | // protobuf generates unannotated methods |
| 85 | disable "UnknownNullness" |
Jamie Garside | a4846a7 | 2021-08-20 18:28:46 +0100 | [diff] [blame] | 86 | } |
Aurimas Liutikas | 7795282 | 2024-12-04 18:00:17 -0800 | [diff] [blame] | 87 | namespace = "androidx.glance.wear.tiles" |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | androidx { |
| 91 | name = "Glance for Wear Tiles" |
Omar Ismail | 8ff41a1 | 2024-04-24 11:29:28 +0100 | [diff] [blame] | 92 | type = LibraryType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS |
Zak Cohen | 0f277ed | 2023-04-20 14:37:35 -0700 | [diff] [blame] | 93 | mavenVersion = LibraryVersions.GLANCE_WEAR_TILES |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 94 | inceptionYear = "2021" |
| 95 | description = "Glance allows developers to build layouts for Wear Tiles using a Jetpack " + |
| 96 | "Compose-style API." |
Aurimas Liutikas | 5c5419a | 2024-05-29 15:26:58 -0700 | [diff] [blame] | 97 | legacyDisableKotlinStrictApiMode = true |
Jinseong Jeon | 01fdca1 | 2024-07-22 22:58:29 -0700 | [diff] [blame] | 98 | metalavaK2UastEnabled = false |
Aurimas Liutikas | cd1946c | 2024-12-11 17:51:26 -0800 | [diff] [blame] | 99 | addGoldenImageAssets() |
Jamie Garside | 0bc8e25 | 2021-08-12 11:16:26 +0100 | [diff] [blame] | 100 | } |