Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/support projectmatrix and support better crossbuilding #440

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
380 changes: 191 additions & 189 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .sbtopts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Dsbt.io.implicit.relative.glob.conversion=allow
258 changes: 224 additions & 34 deletions README.md

Large diffs are not rendered by default.

41 changes: 35 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ addCommandAlias("test", "scripted")

inThisBuild(
List(
name := "ZIO SBT",
startYear := Some(2022),
scalaVersion := Scala212,
crossScalaVersions := Seq(scalaVersion.value),
name := "ZIO SBT",
startYear := Some(2022),
scalaVersion := Scala212,
defaultCrossScalaVersions := Seq(Scala212),
developers := List(
Developer("khajavi", "Milad Khajavi", "[email protected]", url("https://github.com/khajavi"))
),
Expand All @@ -27,13 +27,27 @@ lazy val root = project
publish / skip := true
)
.aggregate(
`zio-sbt-shared`,
`zio-sbt-githubactions`,
`zio-sbt-website`,
`zio-sbt-project`,
`zio-sbt-ecosystem`,
`zio-sbt-ci`,
`zio-sbt-tests`
)
.enablePlugins(ZioSbtCiPlugin)

lazy val `zio-sbt-shared` =
project
.settings(stdSettings())
.settings(
headerEndYear := Some(2024),
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
},
scriptedBufferLog := false
)
.enablePlugins(SbtPlugin)

lazy val `zio-sbt-tests` =
project
Expand All @@ -56,6 +70,20 @@ lazy val `zio-sbt-website` =
)
.enablePlugins(SbtPlugin)

lazy val `zio-sbt-project` =
project
.settings(stdSettings())
.settings(
headerEndYear := Some(2024),
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
},
scriptedBufferLog := false
)
.enablePlugins(SbtPlugin)
.dependsOn(`zio-sbt-shared`)

lazy val `zio-sbt-ecosystem` =
project
.settings(stdSettings())
Expand All @@ -68,6 +96,7 @@ lazy val `zio-sbt-ecosystem` =
scriptedBufferLog := false
)
.enablePlugins(SbtPlugin)
.dependsOn(`zio-sbt-project`)

lazy val `zio-sbt-ci` =
project
Expand All @@ -81,7 +110,7 @@ lazy val `zio-sbt-ci` =
scriptedBufferLog := false
)
.enablePlugins(SbtPlugin)
.dependsOn(`zio-sbt-githubactions`)
.dependsOn(`zio-sbt-githubactions`, `zio-sbt-project`)

lazy val `zio-sbt-githubactions` =
project
Expand Down
248 changes: 219 additions & 29 deletions docs/index.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions project/Versions.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
object Versions {
val Scala212 = "2.12.19"
val Scala213 = "2.13.13"
val Scala3 = "3.3.3"
val zio = "2.0.21"
val Scala212 = "2.12.20"
val Scala213 = "2.13.15"
val Scala3 = "3.3.4"
val zio = "2.1.11"
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.10.1
sbt.version = 1.10.2
6 changes: 6 additions & 0 deletions project/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Compile / unmanagedSourceDirectories += file("zio-sbt-shared/src/main/scala")
Compile / unmanagedResourceDirectories += file("zio-sbt-shared/src/main/resources")

Compile / unmanagedSourceDirectories += file("zio-sbt-project/src/main/scala")
Compile / unmanagedResourceDirectories += file("zio-sbt-project/src/main/resources")

Compile / unmanagedSourceDirectories += file("zio-sbt-ecosystem/src/main/scala")
Compile / unmanagedResourceDirectories += file("zio-sbt-ecosystem/src/main/resources")

Expand Down
21 changes: 10 additions & 11 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
// Build Server Plugins
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.6.0")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "2.0.3")

// Linting Plugins
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.13.0")
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1")

// Versioning and Release Plugins
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")

// Docs Plugins
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.4")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.1")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")

// Cross-Compiler Plugins
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.4")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.5")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")
addSbtPlugin("org.portable-scala" % "sbt-platform-deps" % "1.0.2")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.0")

// Benchmarking Plugins
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7")

libraryDependencies += "org.snakeyaml" % "snakeyaml-engine" % "2.7"
libraryDependencies += "dev.zio" %% "zio" % "2.1.8"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.16.0"
libraryDependencies += "org.snakeyaml" % "snakeyaml-engine" % "2.8"
libraryDependencies += "dev.zio" %% "zio" % "2.1.11"
libraryDependencies += "dev.zio" %% "zio-json" % "0.7.3"
libraryDependencies += "dev.zio" %% "zio-json-yaml" % "0.7.3"
5 changes: 3 additions & 2 deletions zio-sbt-ci/build.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
libraryDependencies += "dev.zio" %% "zio" % "2.1.8"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.16.0"
libraryDependencies += "dev.zio" %% "zio" % "2.1.11"
libraryDependencies += "dev.zio" %% "zio-json" % "0.7.3"
libraryDependencies += "dev.zio" %% "zio-json-yaml" % "0.7.3"
8 changes: 8 additions & 0 deletions zio-sbt-ci/src/main/scala/zio/sbt/CiVersions.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package zio.sbt

object CiVersions {

val TargetJavaVersions: Seq[String] = Seq("11", "17", "21")
val JavaDistribution = "corretto"
val NodeJS = "16.x"
}
2 changes: 1 addition & 1 deletion zio-sbt-ci/src/main/scala/zio/sbt/V.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object V {
Map(
"peter-evans/create-pull-request" -> "v6",
"zio/generate-github-app-token" -> "v1.0.0",
"pierotofy/set-swap-space" -> "master",
"pierotofy/set-swap-space" -> "49819abfb41bd9b44fb781159c033dba90353a7c", // 1.0,
"actions/checkout" -> "v4",
"coursier/cache-action" -> "v6",
"actions/setup-java" -> "v4",
Expand Down
Loading