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

com.autonomousapps.model.ProjectAdvice.kt Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
package com.autonomousapps.model

import com.autonomousapps.advice.PluginAdvice
import com.squareup.moshi.JsonClass

/** Collection of all advice for a single project, across all variants. */
@JsonClass(generateAdapter = false)
data class ProjectAdvice(
  val projectPath: String,
  val dependencyAdvice: Set = emptySet(),
  val pluginAdvice: Set = emptySet(),
  val moduleAdvice: Set = emptySet(),
  /** 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: ProjectAdvice): Int = projectPath.compareTo(other.projectPath)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy