Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

horologist-datalayer-watch dependencies #2241

Open
Tolriq opened this issue May 23, 2024 · 6 comments
Open

horologist-datalayer-watch dependencies #2241

Tolriq opened this issue May 23, 2024 · 6 comments

Comments

@Tolriq
Copy link
Contributor

Tolriq commented May 23, 2024

The module horologist-datalayer-watch have a dependency on libs.androidx.complications.datasource.ktx that have tons of other dependencies, just to extract the name of the ComplicationType in one function.

I'm not sure this is really necessary for this simple need.
(One might also wonder why that wear dep embeds so many side dependencies but that's for another repo)

By side effect it will load appcompat, fragment, drawerlayout, recylerview, .... all those with proguard rules preventing them to be properly stripped.

|    +--- com.google.android.horologist:horologist-datalayer-watch:0.6.12
|    |    +--- com.google.android.horologist:horologist-datalayer:0.6.12 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.24 -> 2.0.0 (*)
|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 (*)
|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.8.1 (*)
|    |    +--- androidx.wear.watchface:watchface-complications-data-source-ktx:1.2.1
|    |    |    +--- androidx.core:core:1.1.0 -> 1.13.1 (*)
|    |    |    +--- androidx.wear.watchface:watchface-complications-data-source:1.2.1
|    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
|    |    |    |    +--- androidx.core:core:1.1.0 -> 1.13.1 (*)
|    |    |    |    +--- androidx.preference:preference:1.1.0
|    |    |    |    |    +--- androidx.appcompat:appcompat:1.1.0 -> 1.6.1
|    |    |    |    |    |    +--- androidx.activity:activity:1.6.0 -> 1.9.0 (*)
|    |    |    |    |    |    +--- androidx.annotation:annotation:1.3.0 -> 1.8.0 (*)
|    |    |    |    |    |    +--- androidx.appcompat:appcompat-resources:1.6.1 (*)
|    |    |    |    |    |    +--- androidx.collection:collection:1.0.0 -> 1.4.0 (*)
|    |    |    |    |    |    +--- androidx.core:core:1.9.0 -> 1.13.1 (*)
|    |    |    |    |    |    +--- androidx.core:core-ktx:1.8.0 -> 1.13.1 (*)
|    |    |    |    |    |    +--- androidx.cursoradapter:cursoradapter:1.0.0
|    |    |    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.8.0 (*)
|    |    |    |    |    |    +--- androidx.drawerlayout:drawerlayout:1.0.0
|    |    |    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.8.0 (*)
|    |    |    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.13.1 (*)
|    |    |    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    |    |    +--- androidx.emoji2:emoji2:1.2.0 -> 1.3.0 (*)
|    |    |    |    |    |    +--- androidx.emoji2:emoji2-views-helper:1.2.0 -> 1.3.0
|    |    |    |    |    |    |    +--- androidx.collection:collection:1.1.0 -> 1.4.0 (*)
|    |    |    |    |    |    |    +--- androidx.core:core:1.3.0 -> 1.13.1 (*)
|    |    |    |    |    |    |    +--- androidx.emoji2:emoji2:1.3.0 (*)
|    |    |    |    |    |    |    \--- androidx.emoji2:emoji2:1.3.0 (c)
|    |    |    |    |    |    +--- androidx.fragment:fragment:1.3.6 -> 1.5.1 (*)
|    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.5.1 -> 2.8.0 (*)
|    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 -> 2.8.0 (*)
|    |    |    |    |    |    +--- androidx.resourceinspection:resourceinspection-annotation:1.0.1
|    |    |    |    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
|    |    |    |    |    |    +--- androidx.savedstate:savedstate:1.2.0 -> 1.2.1 (*)
|    |    |    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 2.0.0 (*)
|    |    |    |    |    |    \--- androidx.appcompat:appcompat-resources:1.6.1 (c)
|    |    |    |    |    +--- androidx.core:core:1.1.0 -> 1.13.1 (*)
|    |    |    |    |    +--- androidx.fragment:fragment:1.1.0 -> 1.5.1 (*)
|    |    |    |    |    +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0
|    |    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
|    |    |    |    |    |    +--- androidx.core:core:1.1.0 -> 1.13.1 (*)
|    |    |    |    |    |    +--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    |    |    \--- androidx.collection:collection:1.0.0 -> 1.4.0 (*)
|    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
|    |    |    |    |    \--- androidx.collection:collection:1.0.0 -> 1.4.0 (*)
|    |    |    |    +--- androidx.wear.watchface:watchface-complications:1.2.1
|    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
|    |    |    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*)
|    |    |    |    |    +--- androidx.core:core:1.1.0 -> 1.13.1 (*)
|    |    |    |    |    +--- androidx.wear.watchface:watchface-complications-data:1.2.1
|    |    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
|    |    |    |    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*)
|    |    |    |    |    |    +--- androidx.core:core:1.1.0 -> 1.13.1 (*)
|    |    |    |    |    |    +--- androidx.preference:preference:1.1.0 (*)
|    |    |    |    |    |    +--- androidx.versionedparcelable:versionedparcelable:1.1.0 -> 1.1.1 (*)
|    |    |    |    |    |    +--- androidx.wear.protolayout:protolayout-expression:1.0.0-beta01
|    |    |    |    |    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*)
|    |    |    |    |    |    |    +--- androidx.annotation:annotation-experimental:1.3.0 -> 1.4.0 (*)
|    |    |    |    |    |    |    +--- androidx.collection:collection:1.2.0 -> 1.4.0 (*)
|    |    |    |    |    |    |    +--- androidx.wear.protolayout:protolayout-proto:1.0.0-beta01
|    |    |    |    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
|    |    |    |    |    |    |    |    +--- androidx.wear.protolayout:protolayout-expression:1.0.0-beta01 (c)
|    |    |    |    |    |    |    |    \--- androidx.wear.protolayout:protolayout-expression-pipeline:1.0.0-beta01 (c)
|    |    |    |    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.0 (*)
|    |    |    |    |    |    |    +--- androidx.wear.protolayout:protolayout-expression-pipeline:1.0.0-beta01 (c)
|    |    |    |    |    |    |    \--- androidx.wear.protolayout:protolayout-proto:1.0.0-beta01 (c)
|    |    |    |    |    |    +--- androidx.wear.protolayout:protolayout-expression-pipeline:1.0.0-beta01
|    |    |    |    |    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*)
|    |    |    |    |    |    |    +--- androidx.annotation:annotation-experimental:1.3.0 -> 1.4.0 (*)
|    |    |    |    |    |    |    +--- androidx.collection:collection:1.2.0 -> 1.4.0 (*)
|    |    |    |    |    |    |    +--- androidx.concurrent:concurrent-futures:1.1.0 (*)
|    |    |    |    |    |    |    +--- androidx.core:core:1.7.0 -> 1.13.1 (*)
|    |    |    |    |    |    |    +--- androidx.wear.protolayout:protolayout-expression:1.0.0-beta01 (*)
|    |    |    |    |    |    |    +--- androidx.wear.protolayout:protolayout-proto:1.0.0-beta01 (*)
|    |    |    |    |    |    |    +--- androidx.wear.protolayout:protolayout-expression:1.0.0-beta01 (c)
|    |    |    |    |    |    |    \--- androidx.wear.protolayout:protolayout-proto:1.0.0-beta01 (c)
|    |    |    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.0 (*)
|    |    |    |    |    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1 -> 1.8.1 (*)
|    |    |    |    |    |    +--- androidx.wear.watchface:watchface-complications:1.2.1 (c)
|    |    |    |    |    |    +--- androidx.wear.watchface:watchface-complications-data-source:1.2.1 (c)
|    |    |    |    |    |    \--- androidx.wear.watchface:watchface-complications-data-source-ktx:1.2.1 (c)
|    |    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.0 (*)
|    |    |    |    |    +--- androidx.wear.watchface:watchface-complications-data:1.2.1 (c)
|    |    |    |    |    +--- androidx.wear.watchface:watchface-complications-data-source:1.2.1 (c)
|    |    |    |    |    \--- androidx.wear.watchface:watchface-complications-data-source-ktx:1.2.1 (c)
|    |    |    |    +--- androidx.wear.watchface:watchface-complications-data:1.2.1 (*)
|    |    |    |    +--- androidx.wear.watchface:watchface-complications:1.2.1 (c)
|    |    |    |    +--- androidx.wear.watchface:watchface-complications-data:1.2.1 (c)
|    |    |    |    \--- androidx.wear.watchface:watchface-complications-data-source-ktx:1.2.1 (c)
|    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.0 (*)
|    |    |    +--- androidx.wear.watchface:watchface-complications-data-source:1.2.1 (c)
|    |    |    +--- androidx.wear.watchface:watchface-complications:1.2.1 (c)
|    |    |    \--- androidx.wear.watchface:watchface-complications-data:1.2.1 (c)
@Tolriq
Copy link
Contributor Author

Tolriq commented May 24, 2024

So not opening a new issue but:

  • composables request androix.wear that is not needed and embed fragment, recyclerview, swiperefresh ...
  • media:data same as above
  • compose-layout embed androidx.wear but unfortunately it's used for AmbientAware, not sure it's worth a module split.

(Yes I know I'm obsessed with APK size and unneeded deps :) )

@yschimke
Copy link
Collaborator

I'll take a look at how this is possible. It's valid and hopefully something to improve.

On the other hand it's convenient to not have more tiny module. Ultimately I wish the androidx API had tight dependencies :)

@Tolriq
Copy link
Contributor Author

Tolriq commented May 24, 2024

androidx API had tight dependencies

So do I, in the end until they split media router I doubt most people will care, it's a pain to maintain a fork just to do it, despite not much to do.
But a few other androidX deps should also be updated for better support of full Compose apps, specially when every one says hey now you should do it in Compose. And still force appcompat, fragments and even drawerlayout for no reason and the proguard rules preventing proper stripping.

Anyway just a quick rant :p

@Tolriq
Copy link
Contributor Author

Tolriq commented Jun 5, 2024

In the same continuation, any reason why tiles have a complication part and all the deps? They seems at first sight pretty unrelated.

@yschimke
Copy link
Collaborator

yschimke commented Jun 5, 2024

@Tolriq a bad judgement call? I think my thinking was that having a whole another module for 1-2 classes was overkill, and I'd expect apps with Tiles to also have Complications.

Let me review. We can move things around when we bump to 0.7.x.

@Tolriq
Copy link
Contributor Author

Tolriq commented Jun 5, 2024

In my case for music it seems the media session already publish the complication data no? Everything seems to work on the watch faces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants