-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from alexarchambault/2.13
Add scala 2.13.0-M5 support
- Loading branch information
Showing
8 changed files
with
72 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,48 @@ | ||
|
||
organization := "com.lihaoyi" | ||
|
||
name := "acyclic" | ||
|
||
version := "0.1.7" | ||
|
||
scalaVersion := "2.11.8" | ||
|
||
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0") | ||
version := "0.1.8" | ||
|
||
resolvers += Resolver.sonatypeRepo("releases") | ||
|
||
libraryDependencies ++= Seq( | ||
"com.lihaoyi" %% "utest" % "0.4.4" % "test", | ||
"com.lihaoyi" %% "utest" % "0.6.6" % "test", | ||
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided" | ||
) | ||
|
||
unmanagedSourceDirectories.in(Compile) ++= { | ||
CrossVersion.partialVersion(scalaBinaryVersion.value) match { | ||
case Some((2, n)) if n == 10 || n == 11 || n == 12 => | ||
Seq(baseDirectory.value / "src" / "main" / "scala-2.10_2.12") | ||
case Some((2, 13)) => | ||
Seq(baseDirectory.value / "src" / "main" / "scala-2.13") | ||
case _ => | ||
Nil | ||
} | ||
} | ||
|
||
testFrameworks += new TestFramework("utest.runner.Framework") | ||
|
||
unmanagedSourceDirectories in Test <+= baseDirectory(_ / "src" / "test" / "resources") | ||
unmanagedSourceDirectories in Test += baseDirectory.value / "src" / "test" / "resources" | ||
|
||
// Sonatype | ||
publishArtifact in Test := false | ||
|
||
publishTo <<= version { (v: String) => | ||
Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2") | ||
} | ||
publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2") | ||
|
||
scmInfo := Some(ScmInfo( | ||
browseUrl = url("https://github.com/lihaoyi/acyclic"), | ||
connection = "scm:git:[email protected]:lihaoyi/acyclic.git" | ||
)) | ||
|
||
licenses := Seq("MIT" -> url("http://www.opensource.org/licenses/mit-license.html")) | ||
|
||
homepage := Some(url("https://github.com/lihaoyi/acyclic")) | ||
|
||
pomExtra := ( | ||
<url>https://github.com/lihaoyi/acyclic</url> | ||
<licenses> | ||
<license> | ||
<name>MIT license</name> | ||
<url>http://www.opensource.org/licenses/mit-license.php</url> | ||
</license> | ||
</licenses> | ||
<scm> | ||
<url>git://github.com/lihaoyi/utest.git</url> | ||
<connection>scm:git://github.com/lihaoyi/acyclic.git</connection> | ||
</scm> | ||
<developers> | ||
<developer> | ||
<id>lihaoyi</id> | ||
<name>Li Haoyi</name> | ||
<url>https://github.com/lihaoyi</url> | ||
</developer> | ||
</developers> | ||
) | ||
developers += Developer( | ||
email = "[email protected]", | ||
id = "lihaoyi", | ||
name = "Li Haoyi", | ||
url = url("https://github.com/lihaoyi") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=0.13.9 | ||
sbt.version=1.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
|
||
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") | ||
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1") | ||
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package acyclic.plugin | ||
|
||
import acyclic.file | ||
|
||
import scala.collection.{SortedSet, SortedSetLike} | ||
import scala.collection.mutable.Builder | ||
import scala.collection.generic.{CanBuildFrom, SortedSetFactory} | ||
import scala.language.implicitConversions | ||
|
||
object Compat { | ||
|
||
// from https://github.com/scala/scala-collection-compat/blob/746a7de28223812b19d0d9f68d2253e0c5f655ca/compat/src/main/scala-2.11_2.12/scala/collection/compat/CompatImpl.scala#L8-L11 | ||
private def simpleCBF[A, C](f: => Builder[A, C]): CanBuildFrom[Any, A, C] = new CanBuildFrom[Any, A, C] { | ||
def apply(from: Any): Builder[A, C] = apply() | ||
def apply(): Builder[A, C] = f | ||
} | ||
|
||
// from https://github.com/scala/scala-collection-compat/blob/746a7de28223812b19d0d9f68d2253e0c5f655ca/compat/src/main/scala-2.11_2.12/scala/collection/compat/PackageShared.scala#L46-L49 | ||
implicit def sortedSetCompanionToCBF[A: Ordering, | ||
CC[X] <: SortedSet[X] with SortedSetLike[X, CC[X]]]( | ||
fact: SortedSetFactory[CC]): CanBuildFrom[Any, A, CC[A]] = | ||
simpleCBF(fact.newBuilder[A]) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package acyclic.plugin | ||
|
||
import acyclic.file | ||
|
||
object Compat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters