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 26import org.jetbrains.kotlin.gradle.tasks.KotlinCompile 27 28plugins { 29 id("AndroidXPlugin") 30 id("com.android.library") 31 id("AndroidXComposePlugin") 32 id("org.jetbrains.kotlin.android") 33} 34 35dependencies { 36 api("androidx.compose.foundation:foundation:1.8.0-rc02") 37 api("androidx.compose.runtime:runtime:1.8.0-rc02") 38 api("androidx.compose.ui:ui:1.8.0-rc02") 39 api("androidx.compose.ui:ui-text:1.8.0-rc02") 40 api(project(":wear:compose:compose-foundation")) 41 42 implementation(libs.kotlinCoroutinesCore) 43 implementation("androidx.compose.animation:animation:1.8.0-rc02") 44 implementation("androidx.compose.material:material-icons-core:1.7.7") 45 implementation("androidx.compose.material:material-ripple:1.7.7") 46 implementation("androidx.compose.ui:ui-util:1.8.0-rc02") 47 implementation("androidx.core:core:1.15.0") 48 implementation(project(":wear:compose:compose-material-core")) 49 implementation("androidx.profileinstaller:profileinstaller:1.4.0") 50 implementation("androidx.graphics:graphics-shapes:1.0.1") 51 implementation("androidx.compose.animation:animation-graphics:1.8.0-rc02") 52 53 androidTestImplementation(project(":compose:ui:ui-test")) 54 androidTestImplementation(project(":compose:ui:ui-test-junit4")) 55 androidTestImplementation(project(":compose:test-utils")) 56 androidTestImplementation(project(":test:screenshot:screenshot")) 57 androidTestImplementation(libs.testParameterInjector) 58 androidTestImplementation(libs.testRunner) 59 androidTestImplementation(libs.truth) 60 androidTestImplementation(project(":wear:compose:compose-material3-samples")) 61 62 testImplementation(libs.testRules) 63 testImplementation(libs.testRunner) 64 testImplementation(libs.junit) 65 66 // Include the wear-sdk jar 67 compileOnly files("../../wear_sdk/wear-sdk.jar") 68 testImplementation(files("../../wear_sdk/wear-sdk.jar")) 69} 70 71android { 72 compileSdk = 35 73 74 defaultConfig { 75 minSdk = 25 76 } 77 // Use Robolectric 4.+ 78 testOptions.unitTests.includeAndroidResources = true 79 buildTypes.configureEach { 80 consumerProguardFiles("proguard-rules.pro") 81 } 82 namespace = "androidx.wear.compose.material3" 83} 84 85androidx { 86 name = "Android Wear Compose Material 3" 87 type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS 88 mavenVersion = LibraryVersions.WEAR_COMPOSE_MATERIAL3 89 inceptionYear = "2022" 90 description = "WearOS Compose Material 3 Library. This library makes it easier for " + 91 "developers to write Jetpack Compose applications for Wearable devices that " + 92 "implement Wear Material 3 Design UX guidelines and specifications. It builds upon " + 93 "the Jetpack Compose libraries." 94 samples(project(":wear:compose:compose-material3-samples")) 95 addGoldenImageAssets() 96} 97 98tasks.withType(KotlinCompile).configureEach { 99 kotlinOptions { 100 freeCompilerArgs += [ 101 "-Xjvm-default=all", 102 ] 103 } 104} 105