blob: a21f20ddfb90d502b9161c071fd761cebc533825 [file] [log] [blame]
Jamie Garside0bc8e252021-08-12 11:16:26 +01001/*
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 Songee0da742024-01-03 14:08:46 -080017/**
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 Garside0bc8e252021-08-12 11:16:26 +010024import androidx.build.LibraryType
Jamie Garside0bc8e252021-08-12 11:16:26 +010025
26plugins {
27 id("AndroidXPlugin")
28 id("com.android.library")
Aurimas Liutikas6a058752023-05-10 15:03:57 -070029 id("org.jetbrains.kotlin.android")
Jamie Garside0bc8e252021-08-12 11:16:26 +010030 id("AndroidXComposePlugin")
31}
32
Jamie Garside0bc8e252021-08-12 11:16:26 +010033dependencies {
Jamie Garside0bc8e252021-08-12 11:16:26 +010034
35 api(project(":glance:glance"))
Zoe Pagebe950652023-03-30 01:01:12 +000036 api(project(":glance:glance-template"))
Nick Anthonya2df0322022-11-10 11:23:30 -050037 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 P280b65f2023-01-24 16:51:51 +000040 api("androidx.wear.tiles:tiles:1.1.0")
Jamie Garside5f2669d2021-08-27 15:19:00 +010041
Jamie Garside0bc8e252021-08-12 11:16:26 +010042 implementation(libs.kotlinStdlib)
Jamie Garside412262d2021-08-24 16:35:00 +010043 implementation(libs.kotlinCoroutinesGuava)
Jeremy Woods460974ee2023-04-24 17:13:39 +000044 implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
45 implementation("androidx.lifecycle:lifecycle-service:2.6.1")
Jamie Garside0bc8e252021-08-12 11:16:26 +010046
Jamie Garsidee23e15e2021-09-13 18:56:05 +010047 testImplementation(libs.testCore)
Jamie Garside0bc8e252021-08-12 11:16:26 +010048 testImplementation(libs.testRules)
49 testImplementation(libs.testRunner)
Jamie Garside5cf6ca42021-08-17 14:53:38 +010050 testImplementation(libs.truth)
Jamie Garside0bc8e252021-08-12 11:16:26 +010051 testImplementation(libs.junit)
Cyrus Boadway46a3f8b2021-09-23 13:27:47 +010052 testImplementation(libs.kotlinTest)
Jamie Garside5cf6ca42021-08-17 14:53:38 +010053 testImplementation(libs.kotlinCoroutinesTest)
Jamie Garside412262d2021-08-24 16:35:00 +010054 testImplementation(libs.robolectric)
Pierre Barbier de Reuille6c7e2cc2021-09-29 20:58:03 +010055 testImplementation(libs.kotlinReflect)
Aurimas Liutikas759f9682022-10-05 07:01:37 -070056 testImplementation(libs.mockitoCore4)
57 testImplementation(libs.mockitoKotlin4)
Xiangyin Ma1d07c032022-01-06 19:13:12 +000058 testImplementation("androidx.core:core-ktx:1.7.0")
59 testImplementation("androidx.wear.tiles:tiles-testing:1.0.0")
Jamie Garsideff5feab2021-08-20 17:33:43 +010060
Alan Viverettec474c5b2021-10-28 16:32:52 -040061 androidTestImplementation("androidx.core:core:1.7.0")
Xiangyin Ma1d07c032022-01-06 19:13:12 +000062 androidTestImplementation("androidx.core:core-ktx:1.7.0")
Jamie Garsideff5feab2021-08-20 17:33:43 +010063 androidTestImplementation(project(":test:screenshot:screenshot"))
Xiangyin Ma1d07c032022-01-06 19:13:12 +000064 androidTestImplementation("androidx.wear.tiles:tiles-renderer:1.0.0")
Jamie Garsideff5feab2021-08-20 17:33:43 +010065 androidTestImplementation(libs.testExtJunit)
66 androidTestImplementation(libs.testCore)
67 androidTestImplementation(libs.testRunner)
68 androidTestImplementation(libs.testRules)
Cyrus Boadway46a3f8b2021-09-23 13:27:47 +010069 androidTestImplementation(libs.kotlinTest)
Jamie Garsideff5feab2021-08-20 17:33:43 +010070 androidTestImplementation(libs.kotlinCoroutinesTest)
Jamie Garside0bc8e252021-08-12 11:16:26 +010071}
72
73android {
74 defaultConfig {
Aurimas Liutikas77952822024-12-04 18:00:17 -080075 minSdk = 26
76 compileSdk = 35
Jamie Garside0bc8e252021-08-12 11:16:26 +010077 }
78 // Use Robolectric 4.+
79 testOptions.unitTests.includeAndroidResources = true
Jamie Garsidea4846a72021-08-20 18:28:46 +010080
81 lintOptions {
82 // TODO(b/191286558): Remove when lint is fixed.
83 disable "UnsafeOptInUsageError", "UnsafeOptInUsageWarning"
Aurimas Liutikas77651962022-10-07 04:52:20 -070084 // protobuf generates unannotated methods
85 disable "UnknownNullness"
Jamie Garsidea4846a72021-08-20 18:28:46 +010086 }
Aurimas Liutikas77952822024-12-04 18:00:17 -080087 namespace = "androidx.glance.wear.tiles"
Jamie Garside0bc8e252021-08-12 11:16:26 +010088}
89
90androidx {
91 name = "Glance for Wear Tiles"
Omar Ismail8ff41a12024-04-24 11:29:28 +010092 type = LibraryType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
Zak Cohen0f277ed2023-04-20 14:37:35 -070093 mavenVersion = LibraryVersions.GLANCE_WEAR_TILES
Jamie Garside0bc8e252021-08-12 11:16:26 +010094 inceptionYear = "2021"
95 description = "Glance allows developers to build layouts for Wear Tiles using a Jetpack " +
96 "Compose-style API."
Aurimas Liutikas5c5419a2024-05-29 15:26:58 -070097 legacyDisableKotlinStrictApiMode = true
Jinseong Jeon01fdca12024-07-22 22:58:29 -070098 metalavaK2UastEnabled = false
Aurimas Liutikascd1946c2024-12-11 17:51:26 -080099 addGoldenImageAssets()
Jamie Garside0bc8e252021-08-12 11:16:26 +0100100}