mirror of https://github.com/sbt/sbt.git
move Scala version into row definition
This commit is contained in:
parent
d2ac3e6fd7
commit
2faf8c6a68
|
|
@ -1,5 +1,5 @@
|
|||
ThisBuild / organization := "com.eed3si9n"
|
||||
ThisBuild / version := "0.1.0-SNAPSHOT"
|
||||
ThisBuild / version := "0.2.0-SNAPSHOT"
|
||||
ThisBuild / description := "sbt plugin to define project matrix for cross building"
|
||||
ThisBuild / licenses := Seq("MIT License" -> url("https://github.com/sbt/sbt-projectmatrix/blob/master/LICENSE"))
|
||||
|
||||
|
|
|
|||
|
|
@ -12,16 +12,13 @@ import sbt.librarymanagement.CrossVersion.partialVersion
|
|||
*
|
||||
* {{{
|
||||
* lazy val core = (projectMatrix in file("core"))
|
||||
* .scalaVersions("2.12.6", "2.11.12")
|
||||
* .settings(
|
||||
* name := "core"
|
||||
* )
|
||||
* .jvmPlatform()
|
||||
* .jvmPlatform(Seq("2.12.6", "2.11.12"))
|
||||
* }}}
|
||||
*/
|
||||
sealed trait ProjectMatrix extends CompositeProject {
|
||||
def scalaVersions(sv: String*): ProjectMatrix
|
||||
|
||||
def id: String
|
||||
|
||||
/** The base directory for the project matrix.*/
|
||||
|
|
@ -63,11 +60,13 @@ sealed trait ProjectMatrix extends CompositeProject {
|
|||
process: Project => Project
|
||||
): ProjectMatrix
|
||||
|
||||
def jvmPlatform(settings: Setting[_]*): ProjectMatrix
|
||||
def jvmPlatform(scalaVersions: Seq[String]): ProjectMatrix
|
||||
def jvmPlatform(scalaVersions: Seq[String], settings: Seq[Setting[_]]): ProjectMatrix
|
||||
|
||||
def jvm: ProjectFinder
|
||||
|
||||
def jsPlatform(settings: Setting[_]*): ProjectMatrix
|
||||
def jsPlatform(scalaVersions: Seq[String]): ProjectMatrix
|
||||
def jsPlatform(scalaVersions: Seq[String], settings: Seq[Setting[_]]): ProjectMatrix
|
||||
|
||||
def js: ProjectFinder
|
||||
|
||||
|
|
@ -181,9 +180,6 @@ object ProjectMatrix {
|
|||
override def configs(cs: Configuration*): ProjectMatrix =
|
||||
copy(configurations = configurations ++ cs)
|
||||
|
||||
override def scalaVersions(sv: String*): ProjectMatrix =
|
||||
copy(scalaVersions = sv)
|
||||
|
||||
override def aggregate(refs: ProjectMatrixReference*): ProjectMatrix =
|
||||
copy(aggregate = (aggregate: Seq[ProjectMatrixReference]) ++ refs)
|
||||
|
||||
|
|
@ -202,11 +198,15 @@ object ProjectMatrix {
|
|||
|
||||
def setPlugins(ns: Plugins): ProjectMatrix = copy(plugins = ns)
|
||||
|
||||
override def jvmPlatform(settings: Setting[_]*): ProjectMatrix =
|
||||
custom(jvmIdSuffix, jvmDirectorySuffix, Nil, { _.settings(settings) })
|
||||
override def jvmPlatform(scalaVersions: Seq[String]): ProjectMatrix =
|
||||
jvmPlatform(scalaVersions, Nil)
|
||||
override def jvmPlatform(scalaVersions: Seq[String], settings: Seq[Setting[_]]): ProjectMatrix =
|
||||
custom(jvmIdSuffix, jvmDirectorySuffix, scalaVersions, { _.settings(settings) })
|
||||
|
||||
override def jsPlatform(settings: Setting[_]*): ProjectMatrix =
|
||||
custom(jsIdSuffix, jsDirectorySuffix, Nil, { _.settings(settings) })
|
||||
override def jsPlatform(scalaVersions: Seq[String]): ProjectMatrix =
|
||||
jsPlatform(scalaVersions, Nil)
|
||||
override def jsPlatform(scalaVersions: Seq[String], settings: Seq[Setting[_]]): ProjectMatrix =
|
||||
custom(jsIdSuffix, jsDirectorySuffix, scalaVersions, { _.settings(settings) })
|
||||
|
||||
override def jvm: ProjectFinder = new SuffixBaseProjectFinder(jvmIdSuffix)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,16 +4,14 @@
|
|||
// )
|
||||
|
||||
lazy val core = (projectMatrix in file("core"))
|
||||
.scalaVersions("2.12.6", "2.11.12")
|
||||
.settings(
|
||||
name := "core"
|
||||
)
|
||||
.jsPlatform()
|
||||
.jsPlatform(scalaVersions = Seq("2.12.8", "2.11.12"))
|
||||
|
||||
lazy val app = (projectMatrix in file("app"))
|
||||
.dependsOn(core)
|
||||
.scalaVersions("2.12.6")
|
||||
.settings(
|
||||
name := "app"
|
||||
)
|
||||
.jsPlatform()
|
||||
.jsPlatform(scalaVersions = Seq("2.12.8"))
|
||||
|
|
|
|||
|
|
@ -4,16 +4,14 @@
|
|||
// )
|
||||
|
||||
lazy val core = (projectMatrix in file("core"))
|
||||
.scalaVersions("2.12.6", "2.11.12")
|
||||
.settings(
|
||||
name := "core"
|
||||
)
|
||||
.jvmPlatform()
|
||||
.jvmPlatform(scalaVersions = Seq("2.12.8", "2.11.12"))
|
||||
|
||||
lazy val app = (projectMatrix in file("app"))
|
||||
.dependsOn(core)
|
||||
.scalaVersions("2.12.6")
|
||||
.settings(
|
||||
name := "app"
|
||||
)
|
||||
.jvmPlatform()
|
||||
.jvmPlatform(scalaVersions = Seq("2.12.8"))
|
||||
|
|
|
|||
Loading…
Reference in New Issue