Skip to content

Commit

Permalink
Merge pull request #21238 from wordpress-mobile/issue/21237-unused-de…
Browse files Browse the repository at this point in the history
…pendencies

Issue/21237 unused dependencies
  • Loading branch information
nbradbury authored Sep 19, 2024
2 parents 9104642 + fce99a6 commit 745ae6f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
24 changes: 12 additions & 12 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -443,18 +443,13 @@ dependencies {
implementation "$gradle.ext.gravatarBinaryPath:$gravatarVersion"

implementation "com.google.android.play:app-update:$googlePlayInAppUpdateVersion"
implementation "com.google.android.play:app-update-ktx:$googlePlayInAppUpdateVersion"

implementation "androidx.arch.core:core-common:$androidxArchCoreVersion"
implementation "androidx.arch.core:core-runtime:$androidxArchCoreVersion"
implementation "com.google.code.gson:gson:$googleGsonVersion"
implementation "androidx.core:core:$androidxCoreVersion"
implementation "androidx.core:core-ktx:$androidxCoreVersion"
implementation "androidx.lifecycle:lifecycle-common:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$androidxLifecycleVersion"
implementation "androidx.activity:activity:$androidxActivityVersion"
implementation "androidx.activity:activity-ktx:$androidxActivityVersion"
implementation "androidx.activity:activity-compose:$androidxActivityVersion"
implementation "androidx.fragment:fragment:$androidxFragmentVersion"
implementation "androidx.fragment:fragment-ktx:$androidxFragmentVersion"
Expand All @@ -468,18 +463,14 @@ dependencies {
implementation "androidx.swiperefreshlayout:swiperefreshlayout:$androidxSwipeToRefreshVersion"
implementation "androidx.preference:preference:$androidxPreferenceVersion"
implementation "androidx.work:work-runtime:$androidxWorkManagerVersion"
implementation "androidx.work:work-runtime-ktx:$androidxWorkManagerVersion"
implementation "androidx.webkit:webkit:$androidxWebkitVersion"
implementation "androidx.constraintlayout:constraintlayout:$androidxConstraintlayoutVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-core:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-process:$androidxLifecycleVersion"
implementation "com.android.volley:volley:$androidVolleyVersion"
implementation "com.google.android.play:review:$googlePlayReviewVersion"
implementation "com.google.android.play:review-ktx:$googlePlayReviewVersion"
implementation "com.google.android.gms:play-services-auth:$googlePlayServicesAuthVersion"
implementation "com.google.mlkit:barcode-scanning-common:$googleMLKitBarcodeScanningCommonVersion"
implementation "com.google.mlkit:text-recognition:$googleMLKitTextRecognitionVersion"
Expand All @@ -492,7 +483,6 @@ dependencies {

implementation "com.android.installreferrer:installreferrer:$androidInstallReferrerVersion"
implementation "com.github.chrisbanes:PhotoView:$chrisbanesPhotoviewVersion"
implementation "org.greenrobot:eventbus:$eventBusVersion"
implementation "org.greenrobot:eventbus-java:$eventBusVersion"
implementation "com.squareup.retrofit2:retrofit:$squareupRetrofitVersion"
implementation "org.apache.commons:commons-text:$apacheCommonsTextVersion"
Expand Down Expand Up @@ -530,16 +520,15 @@ dependencies {
exclude group: 'com.android.support', module: 'support-core-utils'
})
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "org.mockito:mockito-android:$mockitoAndroidVersion"
testImplementation "org.mockito.kotlin:mockito-kotlin:$mockitoKotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$gradle.ext.kotlinVersion"
testImplementation "org.assertj:assertj-core:$assertjVersion"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion"

androidTestImplementation project(path:':libs:mocks')

androidTestImplementation "org.mockito:mockito-android:$mockitoAndroidVersion"
androidTestImplementation "org.mockito.kotlin:mockito-kotlin:$mockitoKotlinVersion"
androidTestImplementation "com.squareup.okhttp3:mockwebserver:$squareupMockWebServerVersion"
androidTestImplementation "androidx.test.uiautomator:uiautomator:$androidxTestUiAutomatorVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxTestEspressoVersion", {
version {
Expand Down Expand Up @@ -617,6 +606,17 @@ dependencies {
implementation "com.automattic.tracks:crashlogging:$automatticTracksVersion"
}

dependencyAnalysis {
issues {
onUnusedDependencies {
// This dependency is actually needed because otherwise UI tests fail to run (but do compile).
exclude("org.mockito:mockito-android")
// This dependency is used by the libs:analytics module, which wasn't converted to adhere to included builds
exclude("com.automattic:Automattic-Tracks-Android")
}
}
}

configurations.all {
// Exclude packaged wordpress sub projects, force the use of the source project
// (eg. use :libs:utils:WordPressUtils instead of 'org.wordpress:utils')
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ ext {
androidxTestExtJunitVersion = '1.2.1'
androidxTestUiAutomatorVersion = '2.3.0'
screengrabVersion = '2.1.1'
squareupMockWebServerVersion = '4.12.0'
wiremockVersion = '2.26.3'
wiremockHttpClientVersion = '4.3.5.1'

Expand Down
1 change: 0 additions & 1 deletion libs/editor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ dependencies {
implementation "org.wordpress:utils:$wordPressUtilsVersion"

implementation "androidx.lifecycle:lifecycle-common:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-core:$androidxLifecycleVersion"
implementation "androidx.core:core:$androidxCoreVersion"
implementation "androidx.fragment:fragment:$androidxFragmentVersion"
Expand Down
9 changes: 0 additions & 9 deletions libs/image-editor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ dependencies {

implementation "androidx.core:core:$androidxCoreVersion"
implementation "androidx.activity:activity:$androidxActivityVersion"
implementation "androidx.activity:activity-ktx:$androidxActivityVersion"
implementation "androidx.fragment:fragment:$androidxFragmentVersion"
implementation "androidx.appcompat:appcompat:$androidxAppcompatVersion"
implementation "androidx.recyclerview:recyclerview:$androidxRecyclerviewVersion"
Expand All @@ -57,7 +56,6 @@ dependencies {
implementation "androidx.navigation:navigation-fragment:$gradle.ext.navigationVersion"
implementation "androidx.navigation:navigation-ui:$gradle.ext.navigationVersion"
implementation "androidx.lifecycle:lifecycle-common:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-core:$androidxLifecycleVersion"
Expand All @@ -76,11 +74,4 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'support-core-utils'
})

androidTestImplementation "androidx.test.ext:junit:$androidxTestExtJunitVersion"
androidTestImplementation("androidx.test.espresso:espresso-core:$androidxTestEspressoVersion") {
version {
strictly androidxTestEspressoVersion
}
}
}

0 comments on commit 745ae6f

Please sign in to comment.