Skip to content

Instantly share code, notes, and snippets.

@Baccata
Created June 21, 2017 07:59
Show Gist options
  • Save Baccata/6b49c79de700d5d9c4fd3116d03eb59a to your computer and use it in GitHub Desktop.
Save Baccata/6b49c79de700d5d9c4fd3116d03eb59a to your computer and use it in GitHub Desktop.
// *****************************************************************************
// Projects
// *****************************************************************************
lazy val `polykind-tests` =
project
.in(file("."))
.enablePlugins(AutomateHeaderPlugin, GitVersioning)
.settings(settings)
.settings(
libraryDependencies ++= Seq(
library.scalaCheck % Test,
library.scalaTest % Test,
library.shapeless
)
)
// *****************************************************************************
// Library dependencies
// *****************************************************************************
lazy val library =
new {
object Version {
val scalaCheck = "1.13.4"
val scalaTest = "3.0.1"
val cats = "0.9.0"
val shapeless = "2.3.2"
val kindProjector = "0.9.3"
val matryoshka = "0.16.5"
val scalameta = "3.0.0-M9"
val circeVersion = "0.8.0"
}
val scalaCheck = "org.scalacheck" %% "scalacheck" % Version.scalaCheck
val scalaTest = "org.scalatest" %% "scalatest" % Version.scalaTest
val cats = "org.typelevel" %% "cats" % Version.cats
val shapeless = "com.chuusai" %% "shapeless" % Version.shapeless
val kindProjector = "org.spire-math" %% "kind-projector" % Version.kindProjector
val matryoshka = "com.slamdata" %% "matryoshka-core" % Version.matryoshka
val scalameta = "org.scalameta" % "paradise_2.12.2" % Version.scalameta
val circeCore = "io.circe" %% "circe-core" % Version.circeVersion
val circeParser = "io.circe" %% "circe-parser" % Version.circeVersion
}
// *****************************************************************************
// Settings
// *****************************************************************************
lazy val settings =
commonSettings ++
gitSettings ++
scalafmtSettings
lazy val commonSettings =
Seq(
organization := "com.github.baccata",
organizationName := "Olivier Mélois",
crossScalaVersions := Seq("2.12.2"),
startYear := Some(2017),
licenses += ("MIT", url("https://opensource.org/licenses/MIT")),
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-language:_",
"-target:jvm-1.8",
"-encoding",
"UTF-8",
"-Yinduction-heuristics",
"-Ykind-polymorphism",
"-Yliteral-types",
"-Xstrict-patmat-analysis"
),
unmanagedSourceDirectories.in(Compile) := Seq(scalaSource.in(Compile).value),
unmanagedSourceDirectories.in(Test) := Seq(scalaSource.in(Test).value),
shellPrompt in ThisBuild := { state =>
val project = Project.extract(state).currentRef.project
s"[$project]> "
}
)
lazy val gitSettings =
Seq(
git.useGitDescribe := true
)
lazy val scalafmtSettings =
Seq(
scalafmtOnCompile := true,
scalafmtVersion := "1.0.0-RC4"
)
inThisBuild(
Seq(
scalaOrganization := "org.typelevel",
scalaVersion := "2.12.2-bin-typelevel-4"
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment