|
| 1 | +/* |
| 2 | + * Copyright 2025 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 | + * https://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 | +plugins { |
| 17 | + alias(libs.plugins.android.application) |
| 18 | + alias(libs.plugins.kotlin.android) |
| 19 | + alias(libs.plugins.kotlin.serialization) |
| 20 | + alias(libs.plugins.kotlin.compose) |
| 21 | +} |
| 22 | + |
| 23 | +android { |
| 24 | + namespace = "com.authentication.shrinewear" |
| 25 | + compileSdk = 36 |
| 26 | + |
| 27 | + defaultConfig { |
| 28 | + applicationId = "com.authentication.shrine" |
| 29 | + minSdk = 30 |
| 30 | + targetSdk = 36 |
| 31 | + versionCode = 1 |
| 32 | + versionName = "1.0" |
| 33 | + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" |
| 34 | + buildConfigField( |
| 35 | + "String", "API_BASE_URL", |
| 36 | + "\"https://project-sesame-426206.appspot.com\"" |
| 37 | + ) |
| 38 | + buildConfigField( |
| 39 | + "String", "GOOGLE_SIGN_IN_SERVER_CLIENT_ID", |
| 40 | + "\"PASTE_YOUR_SERVER_CLIENT_ID_HERE\"" |
| 41 | + ) |
| 42 | + } |
| 43 | + |
| 44 | + signingConfigs { |
| 45 | + getByName("debug") { |
| 46 | + storeFile = file(project.rootProject.file("debug.keystore")) |
| 47 | + } |
| 48 | + } |
| 49 | + |
| 50 | + buildTypes { |
| 51 | + release { |
| 52 | + isMinifyEnabled = false |
| 53 | + } |
| 54 | + debug { |
| 55 | + signingConfig = signingConfigs.getByName("debug") |
| 56 | + } |
| 57 | + } |
| 58 | + |
| 59 | + compileOptions { |
| 60 | + sourceCompatibility = JavaVersion.VERSION_1_8 |
| 61 | + targetCompatibility = JavaVersion.VERSION_1_8 |
| 62 | + } |
| 63 | + |
| 64 | + kotlin { |
| 65 | + compilerOptions { |
| 66 | + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8) |
| 67 | + } |
| 68 | + } |
| 69 | + buildFeatures { |
| 70 | + compose = true |
| 71 | + buildConfig = true |
| 72 | + } |
| 73 | + packaging { |
| 74 | + resources { |
| 75 | + excludes += "/META-INF/{AL2.0,LGPL2.1}" |
| 76 | + } |
| 77 | + } |
| 78 | + |
| 79 | + dependencies { |
| 80 | + // The trailing comments indicate version change status post migration. |
| 81 | + // TODO(johnzoeller): Remove trailing comments once mobile dependency versions are updated. |
| 82 | + implementation(platform(libs.compose.bom)) // "2025.05.00" to .01 |
| 83 | + implementation(libs.core.ktx) // 1.15.0 to 1.13.1 |
| 84 | + implementation(libs.activity.compose) // bom 2025.05.00 to specific 1.9 |
| 85 | + implementation(libs.appcompat) // NO CHANGE |
| 86 | + implementation(libs.compose.material.icons) // Bom "2025.05.00" to .01 |
| 87 | + implementation(libs.compose.ui) // bom "2025.05.00" to .01 |
| 88 | + implementation(libs.credentials) // NO CHANGE |
| 89 | + implementation(libs.credentials.play.services.auth) // NO CHANGE |
| 90 | + implementation(libs.lifecycle.runtime.ktx) // 2.8.7 -> 2.7.0 |
| 91 | + implementation(libs.lifecycle.viewmodel.compose) // 2.8.7 -> 2.7.0 |
| 92 | + implementation(libs.navigation.compose) // 2.9.0 -> 2.7.7 |
| 93 | + |
| 94 | + // Wear Androidx Dependencies |
| 95 | + implementation(libs.wear.compose.material3) // New |
| 96 | + implementation(libs.wear.compose.navigation) // New |
| 97 | + implementation(libs.wear.compose.ui.tooling) // New |
| 98 | + implementation(libs.wear.compose.foundation) // New |
| 99 | + implementation(libs.wear.remote.interactions) // New |
| 100 | + |
| 101 | + // KotlinX |
| 102 | + implementation(platform(libs.kotlin.bom)) // New |
| 103 | + implementation(libs.kotlinx.coroutines.core) // New |
| 104 | + implementation(libs.kotlinx.coroutines.android) // New |
| 105 | + implementation(libs.kotlinx.serialization.core) // New |
| 106 | + implementation(libs.kotlinx.serialization.json) // New |
| 107 | + |
| 108 | + // Wear Horologist SIWG composables |
| 109 | + implementation(libs.horologist.auth.ui) |
| 110 | + implementation(libs.horologist.compose.layout) |
| 111 | + |
| 112 | + // GMS |
| 113 | + implementation(libs.google.id) // NO CHANGE |
| 114 | + implementation(libs.playServicesWearable) // New |
| 115 | + |
| 116 | + // Http Server |
| 117 | + implementation(libs.okhttp) // NO CHANGE |
| 118 | + implementation(libs.okhttp.logging.interceptor) // NO CHANGE |
| 119 | + |
| 120 | + // For Legacy Sign in With Google |
| 121 | + implementation(libs.play.services.auth) // 21.1.1 -> 21.3.0 |
| 122 | + } |
| 123 | +} |
0 commit comments