1/*
2 * Copyright 2022 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 androidx.build.AndroidXComposePlugin
27import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
28
29plugins {
30    id("AndroidXPlugin")
31    id("com.android.library")
32    id("AndroidXComposePlugin")
33    id("org.jetbrains.kotlin.android")
34}
35
36dependencies {
37    api("androidx.compose.foundation:foundation:1.7.4")
38    api("androidx.compose.ui:ui:1.7.4")
39    api("androidx.compose.ui:ui-text:1.7.4")
40    api("androidx.compose.runtime:runtime:1.7.4")
41
42    implementation("androidx.compose.animation:animation:1.7.4")
43    implementation("androidx.compose.material:material-icons-core:1.7.4")
44    implementation("androidx.compose.material:material-ripple:1.7.4")
45    implementation("androidx.compose.ui:ui-util:1.7.4")
46    implementation(project(":wear:compose:compose-foundation"))
47    implementation("androidx.profileinstaller:profileinstaller:1.4.0")
48
49    androidTestImplementation(project(":compose:ui:ui-test"))
50    androidTestImplementation(project(":compose:ui:ui-test-junit4"))
51    androidTestImplementation(project(":compose:test-utils"))
52    androidTestImplementation(libs.testRunner)
53    androidTestImplementation(libs.truth)
54
55    testImplementation(libs.testRules)
56    testImplementation(libs.testRunner)
57    testImplementation(libs.junit)
58}
59
60android {
61    compileSdk = 35
62
63    defaultConfig {
64        minSdk = 25
65    }
66    // Use Robolectric 4.+
67    testOptions.unitTests.includeAndroidResources = true
68    buildTypes.configureEach {
69        consumerProguardFiles("proguard-rules.pro")
70    }
71    namespace = "androidx.wear.compose.material.core"
72}
73
74androidx {
75    name = "Android Wear Compose Material Core"
76    type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
77    inceptionYear = "2022"
78    description = "WearOS Compose Material Core Library. This library contains themeless " +
79            "components that are shared between different WearOS Compose Material libraries. It " +
80            "builds upon the Jetpack Compose libraries."
81}
82
83tasks.withType(KotlinCompile).configureEach {
84    kotlinOptions {
85        freeCompilerArgs += [
86                "-Xjvm-default=all",
87        ]
88    }
89}
90