Merge pull request #2118 from element-hq/misc/jme/only-apply-dependency-analysis-to-some-modules

Only apply dependencyanalysis plugin to some modules
This commit is contained in:
Jorge Martin Espinosa
2023-12-28 18:18:51 +01:00
committed by GitHub
8 changed files with 11 additions and 7 deletions

View File

@@ -111,11 +111,6 @@ allprojects {
*/
}
}
// Detect unused dependencies
apply {
plugin("com.autonomousapps.dependency-analysis")
}
}
// See https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/wiki/Customizing-plugin-behavior

View File

@@ -0,0 +1 @@
Only apply `com.autonomousapps.dependency-analysis` plugin in those modules that need it.

View File

@@ -56,3 +56,6 @@ android.experimental.enableTestFixtures=true
# Create BuildConfig files as bytecode to avoid Java compilation phase
android.enableBuildConfigAsBytecode=true
# By default, the plugin applies itself to all subprojects, but we don't want that as it would cause issues with builds using local AARs
dependency.analysis.autoapply=false

View File

@@ -35,6 +35,7 @@ test_core = "1.5.0"
#other
coil = "2.5.0"
datetime = "0.5.0"
dependencyAnalysis = "1.28.0"
serialization_json = "1.6.2"
showkase = "1.0.2"
appyx = "1.4.0"
@@ -63,6 +64,7 @@ gms_google_services = "com.google.gms:google-services:4.4.0"
# https://firebase.google.com/docs/android/setup#available-libraries
google_firebase_bom = "com.google.firebase:firebase-bom:32.7.0"
firebase_appdistribution_gradle = { module = "com.google.firebase:firebase-appdistribution-gradle", version.ref = "firebaseAppDistribution" }
autonomousapps_dependencyanalysis_plugin = { module = "com.autonomousapps:dependency-analysis-gradle-plugin", version.ref = "dependencyAnalysis" }
# AndroidX
androidx_core = { module = "androidx.core:core", version.ref = "core" }
@@ -213,8 +215,7 @@ detekt = "io.gitlab.arturbosch.detekt:1.23.4"
ktlint = "org.jlleitschuh.gradle.ktlint:12.0.3"
dependencygraph = "com.savvasdalkitsis.module-dependency-graph:0.12"
dependencycheck = "org.owasp.dependencycheck:9.0.7"
# DO NOT UPGRADE FOR NOW! This causes the build to fail with local AAR versions of the Rust SDK
dependencyanalysis = "com.autonomousapps.dependency-analysis:1.27.0"
dependencyanalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysis" }
paparazzi = "app.cash.paparazzi:1.3.1"
kover = "org.jetbrains.kotlinx.kover:0.6.1"
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }

View File

@@ -29,4 +29,5 @@ dependencies {
implementation(platform(libs.google.firebase.bom))
implementation(libs.firebase.appdistribution.gradle)
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
implementation(libs.autonomousapps.dependencyanalysis.plugin)
}

View File

@@ -27,6 +27,7 @@ val libs = the<LibrariesForLibs>()
plugins {
id("com.android.application")
id("kotlin-android")
id("com.autonomousapps.dependency-analysis")
}
android {

View File

@@ -27,6 +27,7 @@ val libs = the<LibrariesForLibs>()
plugins {
id("com.android.library")
id("kotlin-android")
id("com.autonomousapps.dependency-analysis")
}
android {

View File

@@ -25,6 +25,7 @@ val libs = the<LibrariesForLibs>()
plugins {
id("com.android.library")
id("kotlin-android")
id("com.autonomousapps.dependency-analysis")
}
android {