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 Analysis] Remove Unused Dependencies #1090

Merged
merged 11 commits into from
Aug 19, 2024
Merged
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
13 changes: 10 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ dependencies {
implementation project(':wordpress-shortcodes')
implementation project(':media-placeholders')

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutinesVersion"

implementation 'androidx.appcompat:appcompat:1.0.0'
implementation "org.wordpress:utils:$wordpressUtilsVersion"

Expand All @@ -60,3 +57,13 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
}
}

dependencyAnalysis {
issues {
onUnusedDependencies {
// These dependency are not needed but kept to preserve the module's default configuration.
exclude(":media-placeholders")
exclude(":picasso-loader")
}
}
}
9 changes: 1 addition & 8 deletions aztec/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dependencies {
implementation "org.ccil.cowan.tagsoup:tagsoup:$tagSoupVersion"
implementation "org.jsoup:jsoup:$jSoupVersion"

implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.collection:collection:1.1.0'
implementation 'com.google.android.material:material:1.0.0'

implementation "org.wordpress:utils:$wordpressUtilsVersion"
Expand All @@ -61,13 +61,6 @@ dependencies {
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation 'androidx.test:core:1.4.0'

androidTestImplementation 'androidx.test:core:1.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0', {
exclude group: 'com.android.support', module: 'support-annotations'
}

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutinesVersion"

Expand Down
2 changes: 1 addition & 1 deletion aztec/src/main/res/layout/aztec_format_bar_advanced.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@

</RelativeLayout>

<androidx.legacy.widget.Space
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
Expand Down
9 changes: 9 additions & 0 deletions media-placeholders/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ dependencies {
testImplementation "org.robolectric:robolectric:$robolectricVersion"
}

dependencyAnalysis {
issues {
onUnusedDependencies {
// This dependency is actually needed otherwise the build fails in multiple places.
exclude("androidx.appcompat:appcompat")
}
}
}

project.afterEvaluate {
publishing {
publications {
Expand Down
13 changes: 11 additions & 2 deletions picasso-loader/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,21 @@ android {
dependencies {
implementation aztecProjectDependency

implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.collection:collection:1.1.0'
implementation 'androidx.appcompat:appcompat:1.0.0'

implementation "com.squareup.picasso:picasso:$picassoVersion"
}

dependencyAnalysis {
issues {
onUnusedDependencies {
// This dependency is actually needed otherwise the build fails on 'aztec.tag'.
exclude("androidx.appcompat:appcompat")
}
}
}

project.afterEvaluate {
publishing {
publications {
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pluginManagement {
gradle.ext.kotlinVersion = '1.9.24'
gradle.ext.agpVersion = '8.1.0'
gradle.ext.automatticPublishToS3Version = '0.8.0'
gradle.ext.dependencyAnalysisVersion = '1.28.0'
gradle.ext.dependencyAnalysisVersion = '1.33.0'

plugins {
id "com.android.library" version gradle.ext.agpVersion
Expand Down
12 changes: 10 additions & 2 deletions wordpress-comments/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,22 @@ android {
dependencies {
implementation aztecProjectDependency

implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation "org.wordpress:utils:$wordpressUtilsVersion"

testImplementation "junit:junit:$jUnitVersion"
testImplementation "org.robolectric:robolectric:$robolectricVersion"
}

dependencyAnalysis {
issues {
onUnusedDependencies {
// This dependency is actually needed otherwise the build fails in multiple places.
exclude("androidx.appcompat:appcompat")
}
}
}

project.afterEvaluate {
publishing {
publications {
Expand Down
9 changes: 9 additions & 0 deletions wordpress-shortcodes/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ dependencies {
testImplementation "org.robolectric:robolectric:$robolectricVersion"
}

dependencyAnalysis {
issues {
onUnusedDependencies {
// This dependency is actually needed otherwise the build fails in multiple places.
exclude("androidx.appcompat:appcompat")
}
}
}

project.afterEvaluate {
publishing {
publications {
Expand Down
Loading