mirror of https://github.com/sbt/sbt.git
Add conversion for backward compatibility
This commit is contained in:
parent
eea840be2c
commit
8bf9ecaba3
|
|
@ -1,5 +1,7 @@
|
|||
package sbt.librarymanagement
|
||||
|
||||
import java.net.URI
|
||||
|
||||
trait LibraryManagementSyntax0 {
|
||||
// See http://www.scala-lang.org/news/2.12.0#traits-compile-to-interfaces
|
||||
// Avoid defining fields (val or var, but a constant is ok – final val without result type)
|
||||
|
|
@ -35,6 +37,9 @@ trait LibraryManagementSyntax
|
|||
// java.lang.System is more important, so don't alias this one
|
||||
// final val System = C.System
|
||||
final val Optional = C.Optional
|
||||
|
||||
given Conversion[(String, URI), License] with
|
||||
def apply(x: (String, URI)): License = License(x._1, x._2)
|
||||
}
|
||||
|
||||
object syntax extends LibraryManagementSyntax
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ ThisBuild / organization := "com.example"
|
|||
ThisBuild / organizationName := "example"
|
||||
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
|
||||
ThisBuild / licenses += License.Apache2
|
||||
ThisBuild / licenses += ("foo", uri("https://example.com/"))
|
||||
|
||||
lazy val Dev = config("dev").extend(Compile)
|
||||
.describedAs("Dependencies required for development environments")
|
||||
|
|
|
|||
Loading…
Reference in New Issue