bleep.model.BleepVersion.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bleep-model_2.12 Show documentation
Show all versions of bleep-model_2.12 Show documentation
A bleeping fast scala build tool!
The newest version!
//
// GENERATED FILE!
//
package bleep.model
import io.circe.{Decoder, Encoder}
case class BleepVersion(value: String) extends AnyVal {
def latestRelease: BleepVersion = BleepVersion(value.split("\\+").head)
def isDevelopment: Boolean = latestRelease.value != value
}
object BleepVersion {
val dev = BleepVersion("dev")
val current = BleepVersion("0.0.2")
implicit val ordering: Ordering[BleepVersion] = Ordering.by(_.value)
implicit val encodes: Encoder[BleepVersion] = Encoder[String].contramap(_.value)
implicit val decodes: Decoder[BleepVersion] = Decoder[String].map(BleepVersion.apply)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy