From a8bbf29b426b66b4c5f9c21fbc192310f799f207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olive=CC=81r=20Falvai?= Date: Fri, 15 Apr 2022 22:50:54 +0200 Subject: [PATCH] Remove unused dependencies --- build.gradle | 17 +++++++++++++++++ dependencies.gradle | 2 +- library/attachment-viewer/build.gradle | 6 ++++-- library/core-utils/build.gradle | 3 +-- library/multipicker/build.gradle | 2 +- library/ui-styles/build.gradle | 6 +----- matrix-sdk-android-flow/build.gradle | 5 ----- matrix-sdk-android/build.gradle | 10 +--------- vector/build.gradle | 3 --- 9 files changed, 26 insertions(+), 28 deletions(-) diff --git a/build.gradle b/build.gradle index 1ff1da7427..6cbc11351e 100644 --- a/build.gradle +++ b/build.gradle @@ -31,6 +31,7 @@ buildscript { // ktlint Plugin plugins { id "org.jlleitschuh.gradle.ktlint" version "10.2.1" + id 'com.autonomousapps.dependency-analysis' version "1.0.0" } // https://github.com/jeremylong/DependencyCheck @@ -193,3 +194,19 @@ project(":library:diff-match-patch") { // } // } //} + +dependencyAnalysis { + dependencies { + bundle("kotlin-stdlib") { + includeGroup("org.jetbrains.kotlin") + } + bundle("react") { + includeGroup("com.facebook.react") + } + } + issues { + all { + ignoreKtx(true) // default is false + } + } +} diff --git a/dependencies.gradle b/dependencies.gradle index 7666a3bf9f..be1b888502 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -81,7 +81,7 @@ ext.libs = [ 'hiltCompiler' : "com.google.dagger:hilt-compiler:$dagger" ], squareup : [ - 'moshi' : "com.squareup.moshi:moshi-adapters:$moshi", + 'moshi' : "com.squareup.moshi:moshi:$moshi", 'moshiKotlin' : "com.squareup.moshi:moshi-kotlin-codegen:$moshi", 'retrofit' : "com.squareup.retrofit2:retrofit:$retrofit", 'retrofitMoshi' : "com.squareup.retrofit2:converter-moshi:$retrofit" diff --git a/library/attachment-viewer/build.gradle b/library/attachment-viewer/build.gradle index 048710f62c..b51136a993 100644 --- a/library/attachment-viewer/build.gradle +++ b/library/attachment-viewer/build.gradle @@ -55,5 +55,7 @@ dependencies { implementation libs.androidx.appCompat implementation libs.androidx.recyclerview - implementation libs.google.material -} \ No newline at end of file + api("androidx.viewpager2:viewpager2:1.0.0") + implementation("androidx.core:core:1.7.0") + implementation("androidx.transition:transition:1.2.0") +} diff --git a/library/core-utils/build.gradle b/library/core-utils/build.gradle index ad3a948808..1cc518c432 100644 --- a/library/core-utils/build.gradle +++ b/library/core-utils/build.gradle @@ -50,6 +50,5 @@ android { } dependencies { - implementation libs.androidx.appCompat implementation libs.jetbrains.coroutinesAndroid -} \ No newline at end of file +} diff --git a/library/multipicker/build.gradle b/library/multipicker/build.gradle index bb98a2f852..861238c02b 100644 --- a/library/multipicker/build.gradle +++ b/library/multipicker/build.gradle @@ -39,8 +39,8 @@ android { dependencies { implementation libs.androidx.appCompat - implementation libs.androidx.fragmentKtx implementation libs.androidx.exifinterface + implementation libs.androidx.core // Log implementation libs.jakewharton.timber diff --git a/library/ui-styles/build.gradle b/library/ui-styles/build.gradle index 0ac513b252..debfdf8649 100644 --- a/library/ui-styles/build.gradle +++ b/library/ui-styles/build.gradle @@ -54,10 +54,6 @@ android { dependencies { implementation libs.androidx.appCompat implementation libs.google.material - // Pref theme - implementation libs.androidx.preferenceKtx - // PFLockScreen attrs - implementation 'com.github.vector-im:PFLockScreen-Android:1.0.0-beta12' // dialpad dimen implementation 'im.dlg:android-dialer:1.2.5' -} \ No newline at end of file +} diff --git a/matrix-sdk-android-flow/build.gradle b/matrix-sdk-android-flow/build.gradle index ea43ce20c8..fb69af2d82 100644 --- a/matrix-sdk-android-flow/build.gradle +++ b/matrix-sdk-android-flow/build.gradle @@ -31,9 +31,7 @@ android { } dependencies { - implementation project(":matrix-sdk-android") - implementation libs.androidx.appCompat implementation libs.jetbrains.coroutinesCore implementation libs.jetbrains.coroutinesAndroid @@ -41,7 +39,4 @@ dependencies { // Paging implementation libs.androidx.pagingRuntimeKtx - - // Logging - implementation libs.jakewharton.timber } diff --git a/matrix-sdk-android/build.gradle b/matrix-sdk-android/build.gradle index 0cffa4148e..e9c8804bac 100644 --- a/matrix-sdk-android/build.gradle +++ b/matrix-sdk-android/build.gradle @@ -109,7 +109,6 @@ dependencies { implementation libs.jetbrains.coroutinesCore implementation libs.jetbrains.coroutinesAndroid - implementation libs.androidx.appCompat implementation libs.androidx.core // Lifecycle @@ -128,12 +127,11 @@ dependencies { implementation(platform("com.squareup.okhttp3:okhttp-bom:4.9.3")) implementation 'com.squareup.okhttp3:okhttp' implementation 'com.squareup.okhttp3:logging-interceptor' - implementation 'com.squareup.okhttp3:okhttp-urlconnection' implementation libs.squareup.moshi kapt libs.squareup.moshiKotlin - implementation libs.markwon.core + api "com.atlassian.commonmark:commonmark:0.13.0" // Image implementation libs.androidx.exifinterface @@ -149,10 +147,6 @@ dependencies { // Work implementation libs.androidx.work - // FP - implementation libs.arrow.core - implementation libs.arrow.instances - // olm lib is now hosted in MavenCentral implementation 'org.matrix.android:olm-sdk:3.2.10' @@ -174,8 +168,6 @@ dependencies { implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.46' testImplementation libs.tests.junit - testImplementation 'org.robolectric:robolectric:4.7.3' - //testImplementation 'org.robolectric:shadows-support-v4:3.0' // Note: version sticks to 1.9.2 due to https://github.com/mockk/mockk/issues/281 testImplementation libs.mockk.mockk testImplementation libs.tests.kluent diff --git a/vector/build.gradle b/vector/build.gradle index c7950da28e..237754d2d1 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -6,7 +6,6 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-parcelize' apply plugin: 'kotlin-kapt' apply plugin: 'com.likethesalad.stem' -apply plugin: 'dagger.hilt.android.plugin' kapt { correctErrorTypes = true @@ -373,7 +372,6 @@ dependencies { // FlowBinding implementation libs.github.flowBinding implementation libs.github.flowBindingAppcompat - implementation libs.github.flowBindingMaterial implementation libs.airbnb.epoxy implementation libs.airbnb.epoxyGlide @@ -448,7 +446,6 @@ dependencies { implementation 'com.github.jetradarmobile:android-snowfall:1.2.1' // DI implementation libs.dagger.hilt - kapt libs.dagger.hiltCompiler // Analytics implementation 'com.posthog.android:posthog:1.1.2'