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 */
24
25import androidx.build.SoftwareType
26
27plugins {
28    id("AndroidXPlugin")
29    id("com.android.library")
30    id("AndroidXComposePlugin")
31    id("org.jetbrains.kotlin.android")
32}
33
34dependencies {
35    api("androidx.compose.foundation:foundation:1.8.0-rc02")
36    api("androidx.compose.ui:ui:1.8.0-rc02")
37    api("androidx.compose.ui:ui-text:1.8.0-rc02")
38    api("androidx.compose.runtime:runtime:1.8.0-rc02")
39    api(project(":wear:compose:compose-foundation"))
40
41    implementation("androidx.compose.animation:animation:1.8.0-rc02")
42    implementation("androidx.compose.material:material-icons-core:1.7.7")
43    implementation("androidx.compose.material:material-ripple:1.7.7")
44    implementation("androidx.compose.ui:ui-util:1.8.0-rc02")
45    implementation(project(":wear:compose:compose-material-core"))
46    implementation("androidx.profileinstaller:profileinstaller:1.4.0")
47    implementation("androidx.lifecycle:lifecycle-common:2.7.0")
48
49    // This :foundation dependency can be removed once the material libraries are updated to use
50    // 1.7.0 stable.
51    androidTestImplementation(project(":compose:foundation:foundation"))
52    androidTestImplementation(project(":compose:ui:ui-test"))
53    androidTestImplementation(project(":compose:ui:ui-test-junit4"))
54    androidTestImplementation(project(":compose:test-utils"))
55    androidTestImplementation(project(":test:screenshot:screenshot"))
56    androidTestImplementation(libs.testRunner)
57    androidTestImplementation(libs.truth)
58
59    testImplementation(libs.testRules)
60    testImplementation(libs.testRunner)
61    testImplementation(libs.junit)
62}
63
64android {
65    compileSdk = 35
66
67    defaultConfig {
68        minSdk = 25
69    }
70    // Use Robolectric 4.+
71    testOptions.unitTests.includeAndroidResources = true
72    buildTypes.configureEach {
73        consumerProguardFiles("proguard-rules.pro")
74    }
75    namespace = "androidx.wear.compose.material"
76}
77
78androidx {
79    name = "Android Wear Compose Material"
80    type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
81    inceptionYear = "2021"
82    description = "WearOS Compose Material Library. This library makes it easier for developers " +
83            "to write Jetpack Compose applications for Wearable devices that implement Wear " +
84            "Material Design UX guidelines and specifications. It builds upon the Jetpack Compose" +
85            " libraries."
86    metalavaK2UastEnabled = false
87    samples(project(":wear:compose:compose-material-samples"))
88    addGoldenImageAssets()
89}
90