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.animation:animation:1.7.4")
36    api("androidx.compose.ui:ui:1.7.4")
37    api("androidx.compose.runtime:runtime:1.7.4")
38    api("androidx.navigation:navigation-runtime:2.6.0")
39    api(project(":wear:compose:compose-material"))
40    api("androidx.activity:activity-compose:1.9.0")
41    api("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
42
43    implementation("androidx.navigation:navigation-common:2.6.0")
44    implementation("androidx.navigation:navigation-compose:2.6.0")
45    implementation("androidx.profileinstaller:profileinstaller:1.4.0")
46
47    androidTestImplementation(project(":compose:test-utils"))
48    androidTestImplementation(project(":compose:ui:ui-test-junit4"))
49    androidTestImplementation(libs.testRunner)
50    androidTestImplementation(project(":wear:compose:compose-material"))
51    androidTestImplementation(project(":wear:compose:compose-navigation-samples"))
52    androidTestImplementation(libs.truth)
53    androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.7.0")
54    androidTestImplementation("androidx.navigation:navigation-testing:2.6.0")
55}
56
57android {
58    compileSdk = 35
59
60    defaultConfig {
61        minSdk = 25
62    }
63    // Use Robolectric 4.+
64    testOptions.unitTests.includeAndroidResources = true
65    buildTypes.configureEach {
66        consumerProguardFiles("proguard-rules.pro")
67    }
68    namespace = "androidx.wear.compose.navigation"
69}
70
71androidx {
72    name = "Android Wear Compose Navigation"
73    type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
74    inceptionYear = "2021"
75    description = "WearOS Compose Navigation Library. This library makes it easier for developers" +
76            "to write Jetpack Compose applications for Wearable devices by providing " +
77            "functionality to support navigation. " +
78            "It builds upon the Jetpack Compose libraries."
79    samples(project(":wear:compose:compose-navigation-samples"))
80}
81