Skip to content

Commit

Permalink
Merge pull request #1191 from kul3r4/cleanup
Browse files Browse the repository at this point in the history
More cleanup/updates
  • Loading branch information
kul3r4 authored Sep 18, 2024
2 parents e77e367 + 90e7f62 commit 144bf37
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 48 deletions.
2 changes: 1 addition & 1 deletion DataLayer/Application/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ android {
dependencies {
val composeBom = platform(libs.androidx.compose.bom)

coreLibraryDesugaring(libs.android.desugarjdklibs)
coreLibraryDesugaring(libs.desugar.jdk.libs)

implementation(composeBom)
implementation(libs.kotlinx.coroutines.core)
Expand Down
1 change: 0 additions & 1 deletion DataLayer/Wearable/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ dependencies {
implementation(libs.androidx.ui.test.manifest)

// Horologist for correct Compose layout
implementation(libs.horologist.composables)
implementation(libs.horologist.compose.layout)
implementation(libs.horologist.compose.material)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ class NodesViewModel(
)

companion object {
private const val TAG = "NodesViewModel"

val Factory: ViewModelProvider.Factory = viewModelFactory {
initializer {
Expand Down
4 changes: 1 addition & 3 deletions DataLayer/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ compose-compiler = "1.5.15"
ktlint = "0.50.0"
org-jetbrains-kotlin = "1.9.25"
org-jetbrains-kotlinx = "1.9.0"
horologist = "0.5.28"
horologist = "0.6.19"
compose-ui-tooling = "1.4.0"
robolectric = "4.13"
roborazzi = "1.26.0"
ui-test-junit4 = "1.7.1"
ui-test-manifest = "1.7.1"

[libraries]
android-desugarjdklibs = "com.android.tools:desugar_jdk_libs:2.1.2"
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidx-compose-bom" }
androidx-core-ktx = "androidx.core:core-ktx:1.13.1"
Expand All @@ -41,7 +40,6 @@ playservices-wearable = "com.google.android.gms:play-services-wearable:18.2.0"
wear-compose-foundation = { module = "androidx.wear.compose:compose-foundation", version.ref = "androidx-wear-compose" }
wear-compose-material = { module = "androidx.wear.compose:compose-material", version.ref = "androidx-wear-compose" }
wear-compose-ui-tooling = { module = "androidx.wear.compose:compose-ui-tooling", version.ref = "compose-ui-tooling" }
horologist-composables = { module = "com.google.android.horologist:horologist-composables", version.ref = "horologist" }
horologist-compose-layout = { module = "com.google.android.horologist:horologist-compose-layout", version.ref = "horologist" }
horologist-compose-material = { module = "com.google.android.horologist:horologist-compose-material", version.ref = "horologist" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
Expand Down
16 changes: 1 addition & 15 deletions WearOAuth/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ compose-compiler = "1.5.15"
org-jetbrains-kotlin = "1.9.25"
org-jetbrains-kotlinx = "1.9.0"
ktlint = "0.50.0"
horologist = "0.6.12"
horologist = "0.6.19"
robolectric = "4.13"
roborazzi = "1.26.0"
ui-test-junit4 = "1.7.1"
Expand All @@ -26,11 +26,7 @@ androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref
androidx-appcompat = "androidx.appcompat:appcompat:1.7.0"
androidx-compose-ui-tooling = { module = "androidx.wear.compose:compose-ui-tooling", version.ref = "androidx-wear-compose" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidx-compose-bom" }
androidx-constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.4"
androidx-constraintlayout-compose = "androidx.constraintlayout:constraintlayout-compose:1.0.1"
androidx-core-ktx = "androidx.core:core-ktx:1.13.1"
androidx-databinding-viewbinding = "androidx.databinding:viewbinding:8.6.0"
androidx-datastore-preferences = "androidx.datastore:datastore-preferences:1.1.1"
androidx-fragment-ktx = "androidx.fragment:fragment-ktx:1.8.3"
androidx-lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "androidx-lifecycle" }
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" }
Expand All @@ -41,26 +37,16 @@ androidx-media = "androidx.media:media:1.7.0"
androidx-wear = "androidx.wear:wear:1.3.0"
androidx-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest"}
compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "compose-compiler" }
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
compose-material = { module = "androidx.compose.material:material", version.ref = "compose" }
compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose" }
compose-material-ripple = { module = "androidx.compose.material:material-ripple", version.ref = "compose" }
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "ui-test-junit4" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
horologist-compose-layout = { group = "com.google.android.horologist", name = "horologist-compose-layout", version.ref = "horologist" }
horologist-roboscreenshots = { module = "com.google.android.horologist:horologist-roboscreenshots", version.ref = "horologist" }
jacoco-ant = "org.jacoco:org.jacoco.ant:0.8.12"
junit = "junit:junit:4.13.2"
kotlin-annotation-processing-gradle = { module = "org.jetbrains.kotlin:kotlin-annotation-processing-gradle", version.ref = "org-jetbrains-kotlin" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "org-jetbrains-kotlin" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "org-jetbrains-kotlin" }
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "org-jetbrains-kotlin" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "org-jetbrains-kotlinx" }
playservices-wearable = "com.google.android.gms:play-services-wearable:18.2.0"
test-espresso-core = "androidx.test.espresso:espresso-core:3.6.1"
test-ext-junit = "androidx.test.ext:junit:1.2.1"
wear-compose-foundation = { module = "androidx.wear.compose:compose-foundation", version.ref = "androidx-wear-compose" }
wear-compose-material = { module = "androidx.wear.compose:compose-material", version.ref = "androidx-wear-compose" }
wear-compose-navigation = { module = "androidx.wear.compose:compose-navigation", version.ref = "androidx-wear-compose" }
Expand Down
1 change: 0 additions & 1 deletion WearOAuth/oauth-device-grant/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ dependencies {
implementation libs.compose.ui.tooling.preview
implementation(libs.androidx.compose.ui.tooling)


// Horologist dependencies
implementation(libs.horologist.compose.layout)

Expand Down
16 changes: 1 addition & 15 deletions WearSpeakerSample/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
android-gradle-plugin = "8.6.0"
androidx-activity = "1.9.2"
androidx-compose-bom = "2024.09.01"
androidx-lifecycle = "2.7.0"
androidx-media3 = "1.4.1"
androidx-wear-compose = "1.4.0"
compose-compiler = "1.5.15"
Expand All @@ -13,9 +12,7 @@ robolectric = "4.13"
roborazzi = "1.26.0"
ui-test-junit4 = "1.7.1"
ui-test-manifest = "1.7.1"
horologist = "0.5.28"
androidx-constraintlayout-compose = "1.0.1"
kotlinxCoroutine = "1.9.0"
horologist = "0.6.19"

[libraries]
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" }
Expand All @@ -35,7 +32,6 @@ horologist-compose-layout = { module = "com.google.android.horologist:horologist
horologist-compose-material = { module = "com.google.android.horologist:horologist-compose-material", version.ref = "horologist" }
horologist-roboscreenshots = { module = "com.google.android.horologist:horologist-roboscreenshots", version.ref = "horologist" }
horologist-audio-ui = { module = "com.google.android.horologist:horologist-audio-ui", version.ref = "horologist" }
horologist-compose-tools = { group = "com.google.android.horologist", name = "horologist-compose-tools", version.ref = "horologist" }
horologist-images-coil = { module = "com.google.android.horologist:horologist-images-coil", version.ref = "horologist" }
horologist-media-data = { module = "com.google.android.horologist:horologist-media-data", version.ref = "horologist" }
horologist-media-ui = { module = "com.google.android.horologist:horologist-media-ui", version.ref = "horologist" }
Expand All @@ -50,20 +46,10 @@ test-ext-junit = "androidx.test.ext:junit:1.2.1"
wear-compose-foundation = { module = "androidx.wear.compose:compose-foundation", version.ref = "androidx-wear-compose" }
wear-compose-material = { module = "androidx.wear.compose:compose-material", version.ref = "androidx-wear-compose" }
wear-compose-navigation = { module = "androidx.wear.compose:compose-navigation", version.ref = "androidx-wear-compose" }
androidx-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "androidx-constraintlayout-compose" }
compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
androidx-media3-common = { module = "androidx.media3:media3-common", version.ref = "androidx-media3" }
androidx-media3-datasourceokhttp = { module = "androidx.media3:media3-datasource-okhttp", version.ref = "androidx-media3" }
androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "androidx-media3" }
androidx-media3-exoplayerdash = { module = "androidx.media3:media3-exoplayer-dash", version.ref = "androidx-media3" }
androidx-media3-exoplayerhls = { module = "androidx.media3:media3-exoplayer-hls", version.ref = "androidx-media3" }
androidx-media3-exoplayerrtsp = { module = "androidx.media3:media3-exoplayer-rtsp", version.ref = "androidx-media3" }
androidx-media3-exoplayerworkmanager = { module = "androidx.media3:media3-exoplayer-workmanager", version.ref = "androidx-media3" }
androidx-media3-session = { module = "androidx.media3:media3-session", version.ref = "androidx-media3" }
androidx-media3-testutils = { module = "androidx.media3:media3-test-utils", version.ref = "androidx-media3" }
androidx-media3-testutils-robolectric = { module = "androidx.media3:media3-test-utils-robolectric", version.ref = "androidx-media3" }
androidx-media3-ui = { module = "androidx.media3:media3-ui", version.ref = "androidx-media3" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutine" }

[plugins]
com-android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
Expand Down
6 changes: 0 additions & 6 deletions WearSpeakerSample/wear/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ android {

dependencies {
val composeBom = platform(libs.androidx.compose.bom)

implementation(libs.horologist.compose.layout)
implementation(libs.horologist.compose.material)

// General compose dependencies
implementation(composeBom)
implementation(libs.androidx.activity.compose)
Expand All @@ -103,7 +99,6 @@ dependencies {
implementation(libs.androidx.material.icons.core)

// Horologist for correct Compose layout
implementation(libs.horologist.composables)
implementation(libs.horologist.compose.layout)
implementation(libs.horologist.compose.material)

Expand All @@ -129,7 +124,6 @@ dependencies {

implementation(libs.androidx.ui.test.manifest)

// Testing
// Testing
testImplementation(libs.androidx.ui.test.junit4)
testImplementation(libs.junit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import android.media.AudioManager
import androidx.annotation.RequiresPermission
import androidx.compose.foundation.MutatorMutex
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.core.content.ContextCompat
Expand Down Expand Up @@ -68,7 +69,7 @@ class MainState(
* corresponds to the last known value of recording progress (or 0), where that value is useful
* for animations.
*/
var recordingProgress by mutableStateOf(0f)
var recordingProgress by mutableFloatStateOf(0f)
private set

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package com.example.android.wearable.speaker

import androidx.compose.runtime.getValue
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.ViewModelProvider.AndroidViewModelFactory.Companion.APPLICATION_KEY
import androidx.lifecycle.viewModelScope
Expand Down Expand Up @@ -58,10 +57,10 @@ class SpeakerPlayerViewModel(
val playerState = playerRepository.player

@ExperimentalHorologistApi
public companion object {
companion object {
private const val TAG = "SpeakerPlayerViewModel"

public val Factory: ViewModelProvider.Factory = viewModelFactory {
val Factory: ViewModelProvider.Factory = viewModelFactory {
initializer {
val application = this[APPLICATION_KEY]!!

Expand Down
2 changes: 1 addition & 1 deletion WearTilesKotlin/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ androidx-wear-tiles = "1.4.0"
androidx-wear-tooling-preview = "1.0.0"
compose = "1.7.1"
compose-compiler = "1.5.15"
horologist = "0.6.9"
horologist = "0.6.19"
ktlint = "0.50.0"
org-jetbrains-kotlin = "1.9.25"
org-jetbrains-kotlinx = "1.9.0"
Expand Down

0 comments on commit 144bf37

Please sign in to comment.