mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 11:59:12 +03:00
Fine tune dependency analysis, add CI workflow
This commit is contained in:
parent
6c569e6f9d
commit
86663ec073
2 changed files with 40 additions and 1 deletions
8
.github/workflows/quality.yml
vendored
8
.github/workflows/quality.yml
vendored
|
@ -117,6 +117,8 @@ jobs:
|
||||||
${{ runner.os }}-gradle-
|
${{ runner.os }}-gradle-
|
||||||
- name: Lint analysis
|
- name: Lint analysis
|
||||||
run: ./gradlew clean :vector:lint --stacktrace
|
run: ./gradlew clean :vector:lint --stacktrace
|
||||||
|
- name: Dependency analysis
|
||||||
|
run: ./gradlew buildHealth
|
||||||
- name: Upload reports
|
- name: Upload reports
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
@ -124,6 +126,12 @@ jobs:
|
||||||
name: lint-report
|
name: lint-report
|
||||||
path: |
|
path: |
|
||||||
vector/build/reports/*.*
|
vector/build/reports/*.*
|
||||||
|
- 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 Gplay and Fdroid release APK
|
# Lint for Gplay and Fdroid release APK
|
||||||
apk-lint:
|
apk-lint:
|
||||||
|
|
33
build.gradle
33
build.gradle
|
@ -234,7 +234,38 @@ dependencyAnalysis {
|
||||||
}
|
}
|
||||||
issues {
|
issues {
|
||||||
all {
|
all {
|
||||||
ignoreKtx(true) // default is false
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue