|
1 | 1 | import java.util.Properties |
2 | 2 |
|
3 | 3 | plugins { |
4 | | - alias(libs.plugins.android.application) |
5 | | - alias(libs.plugins.kotlin.android) |
6 | | - alias(libs.plugins.kotlin.compose) |
7 | | - id("com.google.devtools.ksp") |
8 | | - id("com.google.dagger.hilt.android") |
9 | | - alias(libs.plugins.errorprone) |
| 4 | + alias(libs.plugins.android.application) |
| 5 | + alias(libs.plugins.kotlin.android) |
| 6 | + alias(libs.plugins.kotlin.compose) |
| 7 | + id("com.google.devtools.ksp") |
| 8 | + id("com.google.dagger.hilt.android") |
| 9 | + alias(libs.plugins.errorprone) |
10 | 10 | } |
11 | 11 |
|
12 | 12 | android { |
13 | 13 | namespace = "com.example.googlehomeapisampleapp" |
14 | 14 | compileSdk = 36 |
15 | 15 |
|
16 | 16 | defaultConfig { |
17 | | - applicationId = "com.example.googlehomeapisampleapp" |
18 | | - minSdk = 29 |
19 | | - targetSdk = 34 |
20 | | - versionCode = 37 |
21 | | - versionName = "1.6.0" |
| 17 | + applicationId = "com.example.googlehomeapisampleapp" |
| 18 | + minSdk = 29 |
| 19 | + targetSdk = 36 |
| 20 | + versionCode = 38 |
| 21 | + versionName = "1.7.0" |
22 | 22 |
|
23 | | - // Store your GCP project web client ID in local.properties and access it via project properties. |
24 | | - // If local.properties doesn't exist in your app root folder, just create it |
25 | | - // e.g. add this line to your local.properties |
26 | | - // WEB_CLIENT_ID_DEV={ProjectNumber}....apps.googleusercontent.com |
27 | | - val localProperties = Properties() |
28 | | - val localPropertiesFile = rootProject.file("local.properties") |
29 | | - if (localPropertiesFile.exists()) { |
30 | | - localPropertiesFile.inputStream().use { localProperties.load(it) } |
31 | | - } |
32 | | - val webClientIdDevRaw = localProperties.getProperty("WEB_CLIENT_ID_DEV") |
33 | | - ?: project.findProperty("WEB_CLIENT_ID_DEV") as? String |
34 | | - ?: "YOUR_DEFAULT_WEB_CLIENT_ID" |
35 | | - val webClientIdDev = webClientIdDevRaw.replace("\"", "") |
36 | | - buildConfigField("String", "DEFAULT_WEB_CLIENT_ID", "\"$webClientIdDev\"") |
37 | | - } |
38 | | - lint { |
39 | | - disable += "NullSafeMutableLiveData" |
| 23 | + // Store your GCP project web client ID in local.properties and access it via project properties. |
| 24 | + // If local.properties doesn't exist in your app root folder, just create it |
| 25 | + // e.g. add this line to your local.properties |
| 26 | + // WEB_CLIENT_ID_DEV={ProjectNumber}....apps.googleusercontent.com |
| 27 | + val localProperties = Properties() |
| 28 | + val localPropertiesFile = rootProject.file("local.properties") |
| 29 | + if (localPropertiesFile.exists()) { |
| 30 | + localPropertiesFile.inputStream().use { localProperties.load(it) } |
40 | 31 | } |
| 32 | + val webClientIdDevRaw = localProperties.getProperty("WEB_CLIENT_ID_DEV") |
| 33 | + ?: project.findProperty("WEB_CLIENT_ID_DEV") as? String |
| 34 | + ?: "YOUR_DEFAULT_WEB_CLIENT_ID" |
| 35 | + val webClientIdDev = webClientIdDevRaw.replace("\"", "") |
| 36 | + buildConfigField("String", "DEFAULT_WEB_CLIENT_ID", "\"$webClientIdDev\"") |
| 37 | + } |
| 38 | + lint { |
| 39 | + disable += "NullSafeMutableLiveData" |
| 40 | + } |
41 | 41 |
|
42 | 42 |
|
43 | | - buildTypes { |
44 | | - release { |
45 | | - isMinifyEnabled = false |
46 | | - proguardFiles( |
47 | | - getDefaultProguardFile("proguard-android-optimize.txt"), |
48 | | - "proguard-rules.pro" |
49 | | - ) |
50 | | - } |
51 | | - } |
52 | | - compileOptions { |
53 | | - sourceCompatibility = JavaVersion.VERSION_1_8 |
54 | | - targetCompatibility = JavaVersion.VERSION_1_8 |
55 | | - } |
56 | | - kotlinOptions { |
57 | | - jvmTarget = "1.8" |
| 43 | + buildTypes { |
| 44 | + release { |
| 45 | + isMinifyEnabled = false |
| 46 | + proguardFiles( |
| 47 | + getDefaultProguardFile("proguard-android-optimize.txt"), |
| 48 | + "proguard-rules.pro" |
| 49 | + ) |
58 | 50 | } |
59 | | - buildFeatures { |
60 | | - compose = true |
61 | | - buildConfig = true |
62 | | - } |
63 | | - composeOptions { |
64 | | - kotlinCompilerExtensionVersion = "1.5.14" |
| 51 | + } |
| 52 | + compileOptions { |
| 53 | + sourceCompatibility = JavaVersion.VERSION_1_8 |
| 54 | + targetCompatibility = JavaVersion.VERSION_1_8 |
| 55 | + } |
| 56 | + kotlin { |
| 57 | + compilerOptions { |
| 58 | + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8) |
65 | 59 | } |
| 60 | + } |
| 61 | + buildFeatures { |
| 62 | + compose = true |
| 63 | + buildConfig = true |
| 64 | + } |
66 | 65 | } |
67 | 66 |
|
68 | 67 | dependencies { |
69 | | - // Library dependencies: |
70 | | - implementation(libs.androidx.core.ktx) |
71 | | - implementation(libs.androidx.lifecycle.runtime.ktx) |
72 | | - implementation(libs.androidx.activity.compose) |
73 | | - implementation(platform(libs.androidx.compose.bom)) |
74 | | - implementation(libs.androidx.ui) |
75 | | - implementation(libs.androidx.ui.graphics) |
76 | | - implementation(libs.androidx.ui.tooling.preview) |
77 | | - implementation(libs.androidx.material3) |
78 | | - implementation("androidx.compose.material:material-icons-extended:1.7.7") |
79 | | - implementation(libs.androidx.navigation.compose) |
80 | | - // Home API SDK dependency: |
81 | | - implementation("com.google.android.gms:play-services-home:17.1.0") |
82 | | - implementation("com.google.android.gms:play-services-home-types:17.1.0") |
83 | | - // Matter Android Demo SDK |
84 | | - implementation(libs.matter.android.demo.sdk) |
| 68 | + // Library dependencies: |
| 69 | + implementation(libs.androidx.core.ktx) |
| 70 | + implementation(libs.androidx.lifecycle.runtime.ktx) |
| 71 | + implementation(libs.androidx.activity.compose) |
| 72 | + implementation(platform(libs.androidx.compose.bom)) |
| 73 | + implementation(libs.androidx.ui) |
| 74 | + implementation(libs.androidx.ui.graphics) |
| 75 | + implementation(libs.androidx.ui.tooling.preview) |
| 76 | + implementation(libs.androidx.material3) |
| 77 | + implementation(libs.androidx.compose.material.icons.extended) |
| 78 | + implementation(libs.androidx.navigation.compose) |
| 79 | + // Home API SDK dependency: |
| 80 | + implementation(libs.play.services.home) |
| 81 | + implementation(libs.play.services.home.types) |
| 82 | + // Matter Android Demo SDK |
| 83 | + implementation(libs.matter.android.demo.sdk) |
| 84 | + |
| 85 | + // Camera |
| 86 | + implementation(libs.dagger.hilt.android) |
| 87 | + implementation(libs.googleid) |
| 88 | + ksp(libs.hilt.android.compiler) |
| 89 | + implementation(libs.androidx.hilt.navigation.compose) |
| 90 | + ksp(libs.androidx.hilt.compiler) |
| 91 | + implementation(libs.stream.webrtc.android) |
| 92 | + implementation(libs.errorprone.annotations) |
| 93 | + |
| 94 | + // Camera Commissioning |
| 95 | + implementation(libs.androidx.camerax.core) |
| 96 | + implementation(libs.androidx.camerax.camera2) |
| 97 | + implementation(libs.androidx.camerax.lifecycle) |
| 98 | + implementation(libs.androidx.camerax.view) |
| 99 | + implementation(libs.mlkit.barcode.scanning) |
85 | 100 |
|
86 | | - // Camera |
87 | | - implementation(libs.dagger.hilt.android) |
88 | | - implementation(libs.googleid) |
89 | | - ksp(libs.hilt.android.compiler) |
90 | | - implementation(libs.androidx.hilt.navigation.compose) |
91 | | - ksp(libs.androidx.hilt.compiler) |
92 | | - implementation(libs.stream.webrtc.android) |
93 | | - implementation(libs.errorprone.annotations) |
| 101 | + // Google Auth |
| 102 | + implementation(libs.androidx.credentials.play.services.auth) |
94 | 103 |
|
95 | | - // Camera Commissioning |
96 | | - implementation(libs.androidx.camerax.core) |
97 | | - implementation(libs.androidx.camerax.camera2) |
98 | | - implementation(libs.androidx.camerax.lifecycle) |
99 | | - implementation(libs.androidx.camerax.view) |
100 | | - implementation(libs.mlkit.barcode.scanning) |
| 104 | + // History Eventing |
| 105 | + implementation(libs.androidx.paging.runtime.ktx) |
| 106 | + implementation(libs.androidx.paging.compose) |
| 107 | + implementation(libs.coil.compose) |
| 108 | + implementation(libs.coil.network.okhttp) |
101 | 109 | } |
0 commit comments