Merge pull request #5780 from ofalvai/dependency-cleanup
Remove unused dependencies
This commit is contained in:
commit
0806e7358a
24
.github/workflows/quality.yml
vendored
24
.github/workflows/quality.yml
vendored
@ -5,6 +5,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ main, develop ]
|
branches: [ main, develop ]
|
||||||
|
|
||||||
|
# Enrich gradle.properties for CI/CD
|
||||||
|
env:
|
||||||
|
CI_GRADLE_ARG_PROPERTIES: >
|
||||||
|
-Porg.gradle.jvmargs=-Xmx4g
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
name: Project Check Suite
|
name: Project Check Suite
|
||||||
@ -97,6 +102,25 @@ jobs:
|
|||||||
comment_id: ${{ steps.fc.outputs.comment-id }}
|
comment_id: ${{ steps.fc.outputs.comment-id }}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Gradle dependency analysis using https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin
|
||||||
|
dependency-analysis:
|
||||||
|
name: Dependency analysis
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Allow all jobs on main and develop. Just one per PR.
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.ref == 'refs/heads/main' && format('dep-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('dep-develop-{0}', github.sha) || format('dep-{0}', github.ref) }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Dependency analysis
|
||||||
|
run: ./gradlew buildHealth $CI_GRADLE_ARG_PROPERTIES
|
||||||
|
- name: Upload dependency analysis
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: dependency-analysis
|
||||||
|
path: build/reports/dependency-analysis/build-health-report.txt
|
||||||
|
|
||||||
# Lint for main module
|
# Lint for main module
|
||||||
android-lint:
|
android-lint:
|
||||||
name: Android Linter
|
name: Android Linter
|
||||||
|
55
build.gradle
55
build.gradle
@ -41,6 +41,9 @@ plugins {
|
|||||||
id "org.jlleitschuh.gradle.ktlint" version "10.3.0"
|
id "org.jlleitschuh.gradle.ktlint" version "10.3.0"
|
||||||
// Detekt
|
// Detekt
|
||||||
id "io.gitlab.arturbosch.detekt" version "1.20.0"
|
id "io.gitlab.arturbosch.detekt" version "1.20.0"
|
||||||
|
|
||||||
|
// Dependency Analysis
|
||||||
|
id 'com.autonomousapps.dependency-analysis' version "1.2.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/jeremylong/DependencyCheck
|
// https://github.com/jeremylong/DependencyCheck
|
||||||
@ -219,3 +222,55 @@ project(":library:diff-match-patch") {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
dependencyAnalysis {
|
||||||
|
dependencies {
|
||||||
|
bundle("kotlin-stdlib") {
|
||||||
|
includeGroup("org.jetbrains.kotlin")
|
||||||
|
}
|
||||||
|
bundle("react") {
|
||||||
|
includeGroup("com.facebook.react")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
issues {
|
||||||
|
all {
|
||||||
|
ignoreKtx(true)
|
||||||
|
onUsedTransitiveDependencies {
|
||||||
|
// Transitively used dependencies that should be declared directly
|
||||||
|
severity("ignore")
|
||||||
|
}
|
||||||
|
onUnusedDependencies {
|
||||||
|
severity("fail")
|
||||||
|
}
|
||||||
|
onUnusedAnnotationProcessors {
|
||||||
|
severity("fail")
|
||||||
|
exclude("com.airbnb.android:epoxy-processor", "com.google.dagger:hilt-compiler") // False positives
|
||||||
|
}
|
||||||
|
}
|
||||||
|
project(":library:jsonviewer") {
|
||||||
|
onUnusedDependencies {
|
||||||
|
exclude("org.json:json") // Used in unit tests, overwrites the one bundled into Android
|
||||||
|
}
|
||||||
|
}
|
||||||
|
project(":library:ui-styles") {
|
||||||
|
onUnusedDependencies {
|
||||||
|
exclude("com.github.vector-im:PFLockScreen-Android") // False positive
|
||||||
|
}
|
||||||
|
}
|
||||||
|
project(":matrix-sdk-android") {
|
||||||
|
onUnusedDependencies {
|
||||||
|
exclude("io.reactivex.rxjava2:rxkotlin") // Transitively required for mocking realm as monarchy doesn't expose Rx
|
||||||
|
}
|
||||||
|
}
|
||||||
|
project(":matrix-sdk-android-flow") {
|
||||||
|
onUnusedDependencies {
|
||||||
|
exclude("androidx.paging:paging-runtime-ktx") // False positive
|
||||||
|
}
|
||||||
|
}
|
||||||
|
project(":vector") {
|
||||||
|
onUnusedDependencies {
|
||||||
|
exclude("org.maplibre.gl:android-sdk", "org.maplibre.gl:android-plugin-annotation-v9") // False positives
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -48,6 +48,7 @@ ext.libs = [
|
|||||||
'coroutinesTest' : "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutines"
|
'coroutinesTest' : "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutines"
|
||||||
],
|
],
|
||||||
androidx : [
|
androidx : [
|
||||||
|
'activity' : "androidx.activity:activity:1.2.4",
|
||||||
'appCompat' : "androidx.appcompat:appcompat:1.4.1",
|
'appCompat' : "androidx.appcompat:appcompat:1.4.1",
|
||||||
'core' : "androidx.core:core-ktx:1.7.0",
|
'core' : "androidx.core:core-ktx:1.7.0",
|
||||||
'recyclerview' : "androidx.recyclerview:recyclerview:1.2.1",
|
'recyclerview' : "androidx.recyclerview:recyclerview:1.2.1",
|
||||||
@ -72,7 +73,9 @@ ext.libs = [
|
|||||||
'testRules' : "androidx.test:rules:$androidxTest",
|
'testRules' : "androidx.test:rules:$androidxTest",
|
||||||
'espressoCore' : "androidx.test.espresso:espresso-core:$espresso",
|
'espressoCore' : "androidx.test.espresso:espresso-core:$espresso",
|
||||||
'espressoContrib' : "androidx.test.espresso:espresso-contrib:$espresso",
|
'espressoContrib' : "androidx.test.espresso:espresso-contrib:$espresso",
|
||||||
'espressoIntents' : "androidx.test.espresso:espresso-intents:$espresso"
|
'espressoIntents' : "androidx.test.espresso:espresso-intents:$espresso",
|
||||||
|
'viewpager2' : "androidx.viewpager2:viewpager2:1.0.0",
|
||||||
|
'transition' : "androidx.transition:transition:1.2.0",
|
||||||
],
|
],
|
||||||
google : [
|
google : [
|
||||||
'material' : "com.google.android.material:material:1.6.0"
|
'material' : "com.google.android.material:material:1.6.0"
|
||||||
@ -84,7 +87,7 @@ ext.libs = [
|
|||||||
'hiltCompiler' : "com.google.dagger:hilt-compiler:$dagger"
|
'hiltCompiler' : "com.google.dagger:hilt-compiler:$dagger"
|
||||||
],
|
],
|
||||||
squareup : [
|
squareup : [
|
||||||
'moshi' : "com.squareup.moshi:moshi-adapters:$moshi",
|
'moshi' : "com.squareup.moshi:moshi:$moshi",
|
||||||
'moshiKotlin' : "com.squareup.moshi:moshi-kotlin-codegen:$moshi",
|
'moshiKotlin' : "com.squareup.moshi:moshi-kotlin-codegen:$moshi",
|
||||||
'retrofit' : "com.squareup.retrofit2:retrofit:$retrofit",
|
'retrofit' : "com.squareup.retrofit2:retrofit:$retrofit",
|
||||||
'retrofitMoshi' : "com.squareup.retrofit2:converter-moshi:$retrofit"
|
'retrofitMoshi' : "com.squareup.retrofit2:converter-moshi:$retrofit"
|
||||||
|
@ -55,5 +55,6 @@ dependencies {
|
|||||||
implementation libs.androidx.appCompat
|
implementation libs.androidx.appCompat
|
||||||
implementation libs.androidx.recyclerview
|
implementation libs.androidx.recyclerview
|
||||||
|
|
||||||
implementation libs.google.material
|
api libs.androidx.viewpager2
|
||||||
|
implementation libs.androidx.transition
|
||||||
}
|
}
|
@ -50,6 +50,5 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation libs.androidx.appCompat
|
|
||||||
implementation libs.jetbrains.coroutinesAndroid
|
implementation libs.jetbrains.coroutinesAndroid
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation libs.androidx.appCompat
|
implementation libs.androidx.appCompat
|
||||||
implementation libs.androidx.core
|
implementation libs.androidx.core
|
||||||
|
implementation libs.androidx.recyclerview
|
||||||
|
|
||||||
implementation libs.airbnb.epoxy
|
implementation libs.airbnb.epoxy
|
||||||
kapt libs.airbnb.epoxyProcessor
|
kapt libs.airbnb.epoxyProcessor
|
||||||
@ -60,7 +61,6 @@ dependencies {
|
|||||||
// Span utils
|
// Span utils
|
||||||
implementation 'me.gujun.android:span:1.7'
|
implementation 'me.gujun.android:span:1.7'
|
||||||
|
|
||||||
implementation libs.google.material
|
|
||||||
|
|
||||||
implementation libs.jetbrains.coroutinesCore
|
implementation libs.jetbrains.coroutinesCore
|
||||||
implementation libs.jetbrains.coroutinesAndroid
|
implementation libs.jetbrains.coroutinesAndroid
|
||||||
|
@ -38,9 +38,9 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation libs.androidx.appCompat
|
api libs.androidx.activity
|
||||||
implementation libs.androidx.fragmentKtx
|
|
||||||
implementation libs.androidx.exifinterface
|
implementation libs.androidx.exifinterface
|
||||||
|
implementation libs.androidx.core
|
||||||
|
|
||||||
// Log
|
// Log
|
||||||
implementation libs.jakewharton.timber
|
implementation libs.jakewharton.timber
|
||||||
|
@ -31,9 +31,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation project(":matrix-sdk-android")
|
implementation project(":matrix-sdk-android")
|
||||||
implementation libs.androidx.appCompat
|
|
||||||
|
|
||||||
implementation libs.jetbrains.coroutinesCore
|
implementation libs.jetbrains.coroutinesCore
|
||||||
implementation libs.jetbrains.coroutinesAndroid
|
implementation libs.jetbrains.coroutinesAndroid
|
||||||
@ -41,7 +39,4 @@ dependencies {
|
|||||||
|
|
||||||
// Paging
|
// Paging
|
||||||
implementation libs.androidx.pagingRuntimeKtx
|
implementation libs.androidx.pagingRuntimeKtx
|
||||||
|
|
||||||
// Logging
|
|
||||||
implementation libs.jakewharton.timber
|
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,6 @@ dependencies {
|
|||||||
implementation libs.jetbrains.coroutinesCore
|
implementation libs.jetbrains.coroutinesCore
|
||||||
implementation libs.jetbrains.coroutinesAndroid
|
implementation libs.jetbrains.coroutinesAndroid
|
||||||
|
|
||||||
implementation libs.androidx.appCompat
|
|
||||||
implementation libs.androidx.core
|
implementation libs.androidx.core
|
||||||
|
|
||||||
// Lifecycle
|
// Lifecycle
|
||||||
@ -155,12 +154,11 @@ dependencies {
|
|||||||
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.9.3"))
|
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.9.3"))
|
||||||
implementation 'com.squareup.okhttp3:okhttp'
|
implementation 'com.squareup.okhttp3:okhttp'
|
||||||
implementation 'com.squareup.okhttp3:logging-interceptor'
|
implementation 'com.squareup.okhttp3:logging-interceptor'
|
||||||
implementation 'com.squareup.okhttp3:okhttp-urlconnection'
|
|
||||||
|
|
||||||
implementation libs.squareup.moshi
|
implementation libs.squareup.moshi
|
||||||
kapt libs.squareup.moshiKotlin
|
kapt libs.squareup.moshiKotlin
|
||||||
|
|
||||||
implementation libs.markwon.core
|
api "com.atlassian.commonmark:commonmark:0.13.0"
|
||||||
|
|
||||||
// Image
|
// Image
|
||||||
implementation libs.androidx.exifinterface
|
implementation libs.androidx.exifinterface
|
||||||
@ -176,10 +174,6 @@ dependencies {
|
|||||||
// Work
|
// Work
|
||||||
implementation libs.androidx.work
|
implementation libs.androidx.work
|
||||||
|
|
||||||
// FP
|
|
||||||
implementation libs.arrow.core
|
|
||||||
implementation libs.arrow.instances
|
|
||||||
|
|
||||||
// olm lib is now hosted in MavenCentral
|
// olm lib is now hosted in MavenCentral
|
||||||
implementation 'org.matrix.android:olm-sdk:3.2.11'
|
implementation 'org.matrix.android:olm-sdk:3.2.11'
|
||||||
|
|
||||||
@ -201,8 +195,6 @@ dependencies {
|
|||||||
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.49'
|
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.49'
|
||||||
|
|
||||||
testImplementation libs.tests.junit
|
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
|
// Note: version sticks to 1.9.2 due to https://github.com/mockk/mockk/issues/281
|
||||||
testImplementation libs.mockk.mockk
|
testImplementation libs.mockk.mockk
|
||||||
testImplementation libs.tests.kluent
|
testImplementation libs.tests.kluent
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'com.android.library'
|
id 'com.android.library'
|
||||||
id 'org.jetbrains.kotlin.android'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@ -14,7 +13,4 @@ android {
|
|||||||
sourceCompatibility versions.sourceCompat
|
sourceCompatibility versions.sourceCompat
|
||||||
targetCompatibility versions.targetCompat
|
targetCompatibility versions.targetCompat
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "11"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -370,7 +370,6 @@ dependencies {
|
|||||||
implementation libs.androidx.lifecycleProcess
|
implementation libs.androidx.lifecycleProcess
|
||||||
implementation libs.androidx.lifecycleRuntimeKtx
|
implementation libs.androidx.lifecycleRuntimeKtx
|
||||||
|
|
||||||
implementation libs.androidx.datastore
|
|
||||||
implementation libs.androidx.datastorepreferences
|
implementation libs.androidx.datastorepreferences
|
||||||
|
|
||||||
|
|
||||||
@ -386,7 +385,6 @@ dependencies {
|
|||||||
// FlowBinding
|
// FlowBinding
|
||||||
implementation libs.github.flowBinding
|
implementation libs.github.flowBinding
|
||||||
implementation libs.github.flowBindingAppcompat
|
implementation libs.github.flowBindingAppcompat
|
||||||
implementation libs.github.flowBindingMaterial
|
|
||||||
|
|
||||||
implementation libs.airbnb.epoxy
|
implementation libs.airbnb.epoxy
|
||||||
implementation libs.airbnb.epoxyGlide
|
implementation libs.airbnb.epoxyGlide
|
||||||
|
Loading…
Reference in New Issue
Block a user