Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
cache: 'sbt'
- uses: sbt/setup-sbt@ce95da69b39609ea153bad087708da5f37366897 # v1, specifically v1.5.10
- name: Compile
run: sbt -v compile
- name: Test
run: sbt -v test
run: sbt -v "testOnly *"

publish:
name: Publish release
Expand All @@ -44,10 +45,11 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
cache: 'sbt'
- uses: sbt/setup-sbt@ce95da69b39609ea153bad087708da5f37366897 # v1, specifically v1.5.10
- name: Compile
run: sbt compile
run: sbt "compile ; shutdown"
- name: Publish artifacts
run: sbt ci-release
env:
Expand Down
5 changes: 4 additions & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ fileOverride {
"glob:**/scala-2.13-/**" {
runner.dialect = scala213
}
}
"glob:**.sbt" {
runner.dialect = scala3
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Available in Maven Central:
val quicklens = "com.softwaremill.quicklens" %% "quicklens" % "1.9.15"
````

Available for Scala 2.11, 2.12, 2.13, [3](https://dotty.epfl.ch), [Scala.js](http://www.scala-js.org) and [Scala Native](http://www.scala-native.org)!
Available for Scala 2.12, 2.13, [3](https://dotty.epfl.ch), [Scala.js](http://www.scala-js.org) and [Scala Native](http://www.scala-native.org)!

## Commercial Support

Expand Down
44 changes: 25 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,37 @@ import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings
import com.softwaremill.Publish.{updateDocs, ossPublishSettings}
import com.softwaremill.UpdateVersionInDocs

val scala211 = "2.11.12"
val scala212 = "2.12.21"
val scala213 = "2.13.18"
val scala3 = "3.3.8"

val scalaIdeaVersion = scala3 // the version for which to import sources into intellij

excludeLintKeys in Global ++= Set(ideSkipProject)
Global / excludeLintKeys ++= Set(ideSkipProject)

val commonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq(
organization := "com.softwaremill.quicklens",
updateDocs := UpdateVersionInDocs(sLog.value, organization.value, version.value, List(file("README.md"))),
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-unchecked"
), // useful for debugging macros: "-Ycheck:all", "-Xcheck-macros"
ideSkipProject := (scalaVersion.value != scalaIdeaVersion)
)
commonSmlBuildSettings
ossPublishSettings

organization := "com.softwaremill.quicklens"
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-unchecked"
) // useful for debugging macros: "-Ycheck:all", "-Xcheck-macros"
ideSkipProject := (scalaVersion.value != scalaIdeaVersion)

lazy val root =
project
.in(file("."))
.settings(commonSettings)
.settings(publishArtifact := false)
.settings(scalaVersion := scalaIdeaVersion)
.aggregate(quicklens.projectRefs: _*)
.settings(
publishArtifact := false,
moduleName := "quicklens-root",
scalaVersion := scalaIdeaVersion,
updateDocs := Def.uncached(
UpdateVersionInDocs(sLog.value, organization.value, version.value, List(file("README.md")))
)
)
.aggregate(quicklens.projectRefs*)

val versionSpecificScalaSources = {
Compile / unmanagedSourceDirectories := {
Expand Down Expand Up @@ -63,19 +67,21 @@ def reflectLibrary(scalaVersion: String) = {
}

lazy val quicklens = (projectMatrix in file("quicklens"))
.settings(commonSettings)
.settings(
name := "quicklens",
libraryDependencies ++= reflectLibrary(scalaVersion.value),
Test / publishArtifact := false,
libraryDependencies ++= compilerLibrary(scalaVersion.value),
versionSpecificScalaSources,
libraryDependencies ++= Seq("flatspec", "shouldmatchers").map(m =>
"org.scalatest" %%% s"scalatest-$m" % "3.2.18" % Test
"org.scalatest" %% s"scalatest-$m" % "3.2.18" % Test
)
)
.jvmPlatform(
scalaVersions = List(scala211, scala212, scala213, scala3)
scalaVersions = List(scala212, scala213, scala3),
settings = Seq(
scalacOptions ++= (if (ScalaArtifacts.isScala3(scalaVersion.value)) Seq.empty else Seq("-release", "8"))
)
)
.jsPlatform(
scalaVersions = List(scala212, scala213, scala3)
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.12.12
sbt.version=2.0.9
7 changes: 3 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.21.0")
val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.22.0")
val scalaNativeVersion = Option(System.getenv("SCALANATIVE_VERSION")).getOrElse("0.5.12")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion)
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.11.0")
addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.2")
addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.4")

val sbtSoftwareMillVersion = "2.1.1"
val sbtSoftwareMillVersion = "3.0.1"
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % sbtSoftwareMillVersion)
Loading