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

ammonite.interp.api.IvyConstructor.scala Maven / Gradle / Ivy

There is a newer version: 3.0.0-2-6342755f
Show newest version
package ammonite.interp.api

import coursierapi.{Dependency, Module}

object IvyConstructor extends IvyConstructor {

  val scalaBinaryVersion =
    scala.util.Properties
              .versionString
              .stripPrefix("version ")
              .split('.')
              .take(2)
              .mkString(".")

  val scalaFullBinaryVersion =
    scala.util.Properties
              .versionNumberString

}
trait IvyConstructor{
  implicit class GroupIdExt(groupId: String){
    def %(artifactId: String) = Module.of(groupId, artifactId)
    def %%(artifactId: String) = Module.of(
      groupId,
      artifactId + "_" + IvyConstructor.scalaBinaryVersion
    )
  }
  implicit class ArtifactIdExt(t: Module){
    def %(version: String) = Dependency.of(t, version)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy