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 */
24import androidx.build.SoftwareType
25
26plugins {
27    id("AndroidXPlugin")
28    id("com.android.library")
29    id("org.jetbrains.kotlin.android")
30    id("androidx.stableaidl")
31}
32
33dependencies {
34    api("androidx.annotation:annotation:1.8.1")
35    api("androidx.core:core:1.6.0")
36    api("androidx.wear:wear:1.2.0")
37    api(libs.kotlinStdlib)
38    api(libs.kotlinCoroutinesCore)
39
40    // Needed for Assert.assertThrows
41    testImplementation(libs.junit)
42    testImplementation(libs.testCore)
43    testImplementation(libs.testRunner)
44    testImplementation(libs.testRules)
45    testImplementation(libs.robolectric)
46    testImplementation(libs.mockitoCore4)
47    testImplementation(libs.truth)
48    testImplementation(libs.mockitoKotlin4)
49
50    // Includes the wear-sdk jar
51    compileOnly files("../../wear/wear_sdk/wear-sdk.jar")
52    testImplementation(files("../../wear/wear_sdk/wear-sdk.jar"))
53}
54
55android {
56    defaultConfig {
57        minSdk = 25
58    }
59
60    // Use Robolectric 4.+
61    testOptions.unitTests.includeAndroidResources = true
62
63    buildFeatures {
64        aidl = true
65    }
66    buildTypes.configureEach {
67        stableAidl {
68            version = 1
69        }
70    }
71    namespace = "androidx.wear.phone.interactions"
72}
73
74androidx {
75    name = "Android Wear Phone Interactions"
76    type = SoftwareType.PUBLISHED_LIBRARY
77    mavenVersion = LibraryVersions.WEAR_PHONE_INTERACTIONS
78    inceptionYear = "2021"
79    description = "Android Wear Phone Interactions"
80    legacyDisableKotlinStrictApiMode = true
81    samples(project(":wear:wear-phone-interactions-samples"))
82}
83