diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2789928d2..b6d8821d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,9 +109,6 @@ jobs: run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties - name: Run Dependency Analysis run: ./gradlew buildHealth - - name: Display analysis report - if: ${{ !cancelled() }} - run: cat build/reports/dependency-analysis/build-health-report.txt unit-test: name: Unit Tests diff --git a/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidApplicationPlugin.kt b/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidApplicationPlugin.kt index b73e6b091..ae12b0827 100644 --- a/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidApplicationPlugin.kt +++ b/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidApplicationPlugin.kt @@ -21,12 +21,14 @@ import org.gradle.kotlin.dsl.extra class PillarboxAndroidApplicationPlugin : Plugin { override fun apply(target: Project) = with(target) { pluginManager.apply("com.android.application") + pluginManager.apply("com.autonomousapps.dependency-analysis") pluginManager.apply("org.jetbrains.kotlin.android") pluginManager.apply("org.jetbrains.kotlin.plugin.compose") extensions.configure { configureAndroidLintModule(this) configureAndroidModule(this) + configureKotlinModule() buildFeatures { compose = true @@ -66,7 +68,5 @@ class PillarboxAndroidApplicationPlugin : Plugin { } } } - - configureKotlinModule() } } diff --git a/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidLibraryPlugin.kt b/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidLibraryPlugin.kt index dc371244b..2a3fabc16 100644 --- a/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidLibraryPlugin.kt +++ b/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidLibraryPlugin.kt @@ -17,6 +17,7 @@ import org.gradle.kotlin.dsl.configure class PillarboxAndroidLibraryPlugin : Plugin { override fun apply(target: Project) = with(target) { pluginManager.apply("com.android.library") + pluginManager.apply("com.autonomousapps.dependency-analysis") pluginManager.apply("org.jetbrains.kotlin.android") extensions.configure { diff --git a/gradle.properties b/gradle.properties index 7158b7907..ba013361f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,5 +23,8 @@ android.useAndroidX=true kotlin.code.style=official org.gradle.caching=true -# Disable configuration cache until Dokka supports it: https://github.com/Kotlin/dokka/issues/2231 +# Disable configuration cache until Dokka supports it: https://github.com/Kotlin/dokka/issues/1217 org.gradle.configuration-cache=false + +# Print dependency analysis report to the console +dependency.analysis.print.build.health=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index dea0c9492..8c9dec036 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,7 +17,7 @@ androidx-test-runner = "1.6.2" androidx-tv-material = "1.0.0" coil = "2.7.0" comscore = "6.11.1" -dependency-analysis-gradle-plugin = "1.33.0" +dependency-analysis-gradle-plugin = "2.0.1" detekt = "1.23.6" dokka = "1.9.20" guava = "33.0.0-android" diff --git a/pillarbox-demo-tv/build.gradle.kts b/pillarbox-demo-tv/build.gradle.kts index 9871a5a9c..e625ea6c8 100644 --- a/pillarbox-demo-tv/build.gradle.kts +++ b/pillarbox-demo-tv/build.gradle.kts @@ -30,7 +30,6 @@ dependencies { implementation(libs.androidx.compose.ui.unit) implementation(libs.androidx.compose.ui.util) implementation(libs.androidx.core) - implementation(libs.androidx.lifecycle.runtime) implementation(libs.androidx.lifecycle.viewmodel) implementation(libs.androidx.lifecycle.viewmodel.compose) implementation(libs.androidx.media3.common)