Skip to content

Commit

Permalink
refresh build
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mie6 committed Sep 18, 2023
1 parent a0b85d0 commit dc3d722
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 20 deletions.
36 changes: 28 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand All @@ -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`)
Expand All @@ -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))
)
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.2
sbt.version=1.9.6
17 changes: 6 additions & 11 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit dc3d722

Please sign in to comment.