com.autonomousapps.advice.BuildHealth.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dependency-analysis-gradle-plugin Show documentation
Show all versions of dependency-analysis-gradle-plugin Show documentation
Analyzes dependency usage in Android and JVM projects
package com.autonomousapps.advice
import org.gradle.api.Incubating
/**
* For the entire multi-project project.
*/
@Incubating
data class BuildHealth(
val projectPath: String,
val dependencyAdvice: Set,
val pluginAdvice: Set,
/**
* True if there is any advice in a category for which the user has declared they want the build
* to fail.
*/
val shouldFail: Boolean = false
) : Comparable {
fun isEmpty(): Boolean = dependencyAdvice.isEmpty() && pluginAdvice.isEmpty()
fun isNotEmpty(): Boolean = !isEmpty()
override fun compareTo(other: BuildHealth): Int {
return projectPath.compareTo(other.projectPath)
}
}
/**
* Collection of all dependency-related advice and plugin-related advice for a single project,
* across all variants.
*/
data class ComprehensiveAdvice(
val dependencyAdvice: Set,
val pluginAdvice: Set,
/**
* True if there is any advice in a category for which the user has declared they want the build
* to fail.
*/
val shouldFail: Boolean = false
)