All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.autonomousapps.advice.BuildHealth.kt Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
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
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy