Skip to content

Commit

Permalink
Unify build, workflows (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
catostrophe authored Jun 21, 2021
1 parent 5a09b99 commit 7d4076e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Trace4Cats Documentation and Examples

[![Continuous Integration](https://github.com/trace4cats/trace4cats-docs/workflows/Continuous%20Integration/badge.svg)](https://github.com/trace4cats/trace4cats-docs/actions?query=workflow%3A%22Continuous%20Integration%22)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/trace4cats/trace4cats-docs/Continuous%20Integration)](https://github.com/trace4cats/trace4cats-docs/actions?query=workflow%3A%22Continuous%20Integration%22)
[![Join the chat at https://gitter.im/trace4cats/community](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/trace4cats/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)

Expand Down
15 changes: 7 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
lazy val commonSettings = Seq(
libraryDependencies += compilerPlugin(("org.typelevel" %% "kind-projector" % "0.13.0").cross(CrossVersion.patch)),
Compile / compile / javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1") :: Nil
case _ => Nil
case Some((2, _)) =>
Seq(compilerPlugin(Dependencies.kindProjector), compilerPlugin(Dependencies.betterMonadicFor))
case _ => Seq.empty
}
},
Compile / compile / javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
scalacOptions := {
val opts = scalacOptions.value :+ "-Wconf:src=src_managed/.*:s,any:wv"

val opts = scalacOptions.value
val wconf = "-Wconf:any:wv"
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 12)) => opts.filterNot(Set("-Xfatal-warnings"))
case Some((2, _)) => opts :+ wconf
case _ => opts
}
},
Test / fork := true,
resolvers += Resolver.sonatypeRepo("releases"),
ThisBuild / evictionErrorLevel := Level.Warn,
)

lazy val noPublishSettings =
Expand Down
6 changes: 6 additions & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ object Dependencies {
val catsEffect = "3.1.1"
val http4s = "0.23.0-RC1"
val sttpClient3 = "3.3.6"

val kindProjector = "0.13.0"
val betterMonadicFor = "0.3.1"
}

lazy val trace4catsDynamicSampling = "io.janstenpickle" %% "trace4cats-dynamic-sampling" % Versions.trace4cats
Expand Down Expand Up @@ -80,4 +83,7 @@ object Dependencies {
lazy val http4sBlazeClient = "org.http4s" %% "http4s-blaze-client" % Versions.http4s
lazy val http4sBlazeServer = "org.http4s" %% "http4s-blaze-server" % Versions.http4s
lazy val sttpClient3Http4s = "com.softwaremill.sttp.client3" %% "http4s-backend" % Versions.sttpClient3

lazy val kindProjector = ("org.typelevel" % "kind-projector" % Versions.kindProjector).cross(CrossVersion.full)
lazy val betterMonadicFor = "com.olegpy" %% "better-monadic-for" % Versions.betterMonadicFor
}

0 comments on commit 7d4076e

Please sign in to comment.