-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
9 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,6 +1,17 @@ | ||
ThisBuild / version := "0.3.0" | ||
ThisBuild / version := "0.3.1" | ||
ThisBuild / scalaVersion := "3.1.3" | ||
|
||
// all LTS versions & latest minor ones | ||
val supportedScalaVersions = List( | ||
"3.1.3", | ||
"3.2.2", | ||
"3.3.0", | ||
"3.3.1", | ||
"3.3.3", | ||
"3.4.0" | ||
) | ||
|
||
ThisBuild / crossScalaVersions := supportedScalaVersions | ||
ThisBuild / publishMavenStyle := true | ||
ThisBuild / crossPaths := false | ||
ThisBuild / versionScheme := Some("early-semver") | ||
|
@@ -23,7 +34,7 @@ inThisBuild( | |
"polentino", | ||
"Diego Casella", | ||
"[email protected]", | ||
url("https://be.linkedin.com/in/diegocasella") | ||
url("https://linkedin.com/in/diegocasella") | ||
) | ||
) | ||
) | ||
|
@@ -34,6 +45,7 @@ Global / onChangedBuildSource := ReloadOnSourceChanges | |
lazy val root = (project in file(".")) | ||
.settings( | ||
name := "redacted-root", | ||
crossScalaVersions := Nil, | ||
publish / skip := true | ||
) | ||
.aggregate(redactedLibrary, redactedCompilerPlugin, redactedTests) | ||
|
@@ -44,19 +56,22 @@ val scalafixSettings = Seq( | |
semanticdbVersion := scalafixSemanticdb.revision | ||
) | ||
|
||
val crossCompileSettings = scalafixSettings ++ Seq( | ||
Test / skip := true, | ||
crossTarget := target.value / s"scala-${scalaVersion.value}", // workaround for https://github.com/sbt/sbt/issues/5097 | ||
crossVersion := CrossVersion.full, | ||
crossScalaVersions := supportedScalaVersions, | ||
) | ||
|
||
lazy val redactedLibrary = (project in file("library")) | ||
.settings(name := "redacted") | ||
.settings( | ||
scalafixSettings, | ||
Test / skip := true | ||
) | ||
.settings(crossCompileSettings) | ||
|
||
lazy val redactedCompilerPlugin = (project in file("plugin")) | ||
.dependsOn(redactedLibrary) | ||
.settings(name := "redacted-plugin") | ||
.settings(scalafixSettings) | ||
.settings(crossCompileSettings) | ||
.settings( | ||
Test / skip := true, | ||
assembly / assemblyJarName := { | ||
val assemblyJarFile = (Compile / Keys.`package`).value | ||
assemblyJarFile.getName | ||
|
@@ -82,5 +97,7 @@ lazy val redactedTests = (project in file("tests")) | |
} | ||
) | ||
|
||
addCommandAlias("testAll", "; +test") | ||
addCommandAlias("publishAll", "; +publish") | ||
addCommandAlias("fmt", "; scalafix; scalafmtAll; scalafmtSbt") | ||
addCommandAlias("fmtCheck", "; scalafmtCheckAll ; scalafmtSbtCheck") |