-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add means to shim out sbt-project-matrix for IntelliJ import
- Loading branch information
Showing
4 changed files
with
69 additions
and
27 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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import sbt.Keys.scalaVersion | ||
import sbt.Project.{ projectToLocalProject, projectToRef } | ||
import sbt.{ Keys, LocalProject, Project, ProjectRef } | ||
import scala.language.experimental.macros | ||
|
||
object ProjectMatrixShims { | ||
|
||
implicit def RichProject(p: Project) = new RichProject(p) | ||
|
||
class RichProject(p: Project) { | ||
def projectRefs: List[LocalProject] = projectToLocalProject(p) :: Nil | ||
def jvmPlatform(scalaVersions: Seq[String]) = p.settings(scalaVersion := scalaVersions.head) | ||
def jvmPlatform(autoScalaLibrary: Boolean) = | ||
p.settings(Keys.autoScalaLibrary := autoScalaLibrary) | ||
def jvm(version: String) = p | ||
def jvm(version: Boolean) = p | ||
} | ||
|
||
def projectMatrix: Project = macro sbt.Project.projectMacroImpl | ||
|
||
} |