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

Dependency cleanup #8001

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions feature/settings/import/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies {
implementation(libs.appauth)

implementation(libs.androidx.fragment.compose)
implementation(libs.androidx.fragment.ktx)
implementation(libs.androidx.constraintlayout)
implementation(libs.fastadapter)

Expand Down
6 changes: 5 additions & 1 deletion feature/widget/message-list/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ plugins {
}

dependencies {
api(projects.app.core)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make :app:core part of :feature:widget:message-list's API surface? Ideally a feature module would never make any of its dependencies part of its public API.


implementation(projects.app.ui.legacy)
implementation(projects.app.core)
implementation(projects.core.ui.legacy.designsystem)
implementation(projects.mail.common)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like this should be tackled once we actually work on removing the dependency on :app:core. Chances are that will also get rid of the :mail:common dependency. It doesn't feel like adding a direct dependency on :mail:common now while also keeping the :app:core dependency adds any value.


implementation(libs.androidx.appcompat)
implementation(libs.timber)
}

Expand Down
7 changes: 6 additions & 1 deletion feature/widget/shortcut/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ plugins {
}

dependencies {
implementation(projects.app.ui.legacy)
api(projects.app.ui.legacy)

implementation(projects.app.core)
implementation(projects.core.ui.legacy.theme2.common)

implementation(libs.androidx.annotation)
implementation(libs.androidx.lifecycle.viewmodel)
}

android {
Expand Down
15 changes: 12 additions & 3 deletions feature/widget/unread/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ plugins {
}

dependencies {
implementation(projects.app.ui.legacy)
implementation(projects.app.core)
api(projects.app.core)
api(projects.app.ui.base)
api(projects.app.ui.legacy)
api(projects.mail.common)
Comment on lines +6 to +9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dramatically increases the API surface of the feature module. Why?


implementation(libs.preferencex)
api(libs.preferencex)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make this particular library an API dependency?


implementation(projects.core.ui.legacy.designsystem)

implementation(libs.androidx.fragment)
implementation(libs.androidx.lifecycle.viewmodel)
implementation(libs.androidx.preference)
implementation(libs.timber)

testImplementation(libs.robolectric)
testImplementation(libs.robolectric.shadows)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API surface of org.robolectric:shadows-framework is part of org.robolectric:robolectric's API surface. We'll never use the shadows framework independently of Robolectric. Why include a direct dependency?

}

android {
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "androidxCoreSplashscreen" }
androidx-fragment = { module = "androidx.fragment:fragment", version.ref = "androidxFragment" }
androidx-fragment-compose = { module = "androidx.fragment:fragment-compose", version.ref = "androidxFragment" }
androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidxFragment" }
androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "androidxLifecycle" }
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidxLifecycle" }
androidx-lifecycle-runtime-testing = { module = "androidx.lifecycle:lifecycle-runtime-testing", version.ref = "androidxLifecycle" }
Expand Down Expand Up @@ -221,6 +222,7 @@ preferencex = { module = "com.takisoft.preferencex:preferencex", version.ref = "
preferencex-colorpicker = { module = "com.takisoft.preferencex:preferencex-colorpicker", version.ref = "preferencesFix" }
preferencex-datetimepicker = { module = "com.takisoft.preferencex:preferencex-datetimepicker", version.ref = "preferencesFix" }
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
robolectric-shadows = { module = "org.robolectric:shadows-framework", version.ref = "robolectric" }
safeContentResolver = { module = "de.cketti.safecontentresolver:safe-content-resolver-v21", version.ref = "safeContentResolver" }
searchPreference = { module = "com.github.ByteHamster:SearchPreference", version.ref = "searchPreference" }
timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" }
Expand Down
1 change: 0 additions & 1 deletion ui-utils/ToolbarBottomSheet/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dependencies {
api(libs.androidx.coordinatorlayout)

implementation(libs.androidx.annotation)
implementation(libs.androidx.fragment)
implementation(libs.androidx.lifecycle.viewmodel)
}

Expand Down