diff --git a/build.sbt b/build.sbt index a68be88..f79d9bb 100644 --- a/build.sbt +++ b/build.sbt @@ -2,14 +2,22 @@ import org.scalajs.linker.interface.ESVersion import com.typesafe.tools.mima.core._ val projectName = "parsley-cats" -val Scala213 = "2.13.10" -val Scala212 = "2.12.17" -val Scala3 = "3.2.1" +val Scala213 = "2.13.12" +val Scala212 = "2.12.18" +val Scala3 = "3.3.0" +val Java8 = JavaSpec.temurin("8") +val JavaLTS = JavaSpec.temurin("11") +val JavaLatest = JavaSpec.temurin("17") + +val mainBranch = "master" Global / onChangedBuildSource := ReloadOnSourceChanges +val releaseFlags = Seq("-Xdisable-assertions", "-opt:l:method,inline", "-opt-inline-from", "parsley.**", "-opt-warnings:at-inline-failed") +val noReleaseFlagsScala3 = true // maybe some day this can be turned off... + inThisBuild(List( - tlBaseVersion := "1.2", + tlBaseVersion := "1.3", organization := "com.github.j-mie6", startYear := Some(2022), homepage := Some(url("https://github.com/j-mie6/parsley-cats")), @@ -30,9 +38,11 @@ inThisBuild(List( ProblemFilters.exclude[MissingClassProblem]("parsley.MonoidKForParsley"), ), // CI Configuration - tlCiReleaseBranches := Seq("master"), + tlCiReleaseBranches := Seq(mainBranch), tlSonatypeUseLegacyHost := false, - githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"), JavaSpec.temurin("11"), JavaSpec.temurin("17")), + tlCiScalafmtCheck := false, + tlCiHeaderCheck := true, + githubWorkflowJavaVersions := Seq(Java8, JavaLTS, JavaLatest), )) lazy val root = tlCrossRootProject.aggregate(`parsley-cats`) @@ -43,13 +53,23 @@ lazy val `parsley-cats` = crossProject(JVMPlatform, JSPlatform, NativePlatform) .in(file("parsley-cats")) .settings( name := projectName, + + headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax, + headerEmptyLine := false, + libraryDependencies ++= Seq( "org.typelevel" %%% "cats-core" % "2.8.0", "com.github.j-mie6" %%% "parsley" % "4.0.0", - "org.scalatest" %%% "scalatest" % "3.2.12" % Test, + "org.scalatest" %%% "scalatest" % "3.2.17" % Test, "org.typelevel" %%% "cats-laws" % "2.8.0" % Test, ), + + Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oI"), + + scalacOptions ++= { + if (!isSnapshot.value && !(noReleaseFlagsScala3 && scalaBinaryVersion.value == "3")) releaseFlags else Seq.empty + }, ) .jsSettings( - Test / scalaJSLinkerConfig := scalaJSLinkerConfig.value.withESFeatures(_.withESVersion(ESVersion.ES2018)) + // Test / scalaJSLinkerConfig := scalaJSLinkerConfig.value.withESFeatures(_.withESVersion(ESVersion.ES2018)) ) diff --git a/project/build.properties b/project/build.properties index 46e43a9..2743082 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.2 +sbt.version=1.9.6 diff --git a/project/plugins.sbt b/project/plugins.sbt index 8ec63cf..0b0e38e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,23 +1,18 @@ -val sbtTypelevelVersion = "0.4.19" +val sbtTypelevelVersion = "0.5.3" libraryDependencySchemes ++= Seq( "org.scala-native" % "sbt-scala-native" % VersionScheme.Always, "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always, ) -//addSbtPlugin("org.typelevel" % "sbt-typelevel" % sbtTypelevelVersion) // disabled because I don't want headers and formatting checks -addSbtPlugin("org.typelevel" % "sbt-typelevel-settings" % sbtTypelevelVersion) -addSbtPlugin("org.typelevel" % "sbt-typelevel-ci-release" % sbtTypelevelVersion) +addSbtPlugin("org.typelevel" % "sbt-typelevel" % sbtTypelevelVersion) // Cross Project Setup -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") -addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.8") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.15") // Other -// This is here purely to enable the niceness settings -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.beautiful-scala" % "sbt-scalastyle" % "1.5.1") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.5") +addSbtPlugin("org.jmotor.sbt" % "sbt-dependency-updates" % "1.2.7") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") addSbtPlugin("com.timushev.sbt" % "sbt-rewarn" % "0.1.3")