Skip to content

Commit

Permalink
stop publishing cats all bundle , start to publish cats-testkit (#1758)
Browse files Browse the repository at this point in the history
stop publishing cats all bundle , start to publish cats-testkit
  • Loading branch information
kailuowang authored and edmundnoble committed Jul 19, 2017
1 parent 8e38d9d commit 3a83346
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ lazy val botBuild = settingKey[Boolean]("Build by TravisCI instead of local dev

lazy val scoverageSettings = Seq(
coverageMinimum := 60,
coverageFailOnMinimum := false
coverageFailOnMinimum := false,
//https://github.com/scoverage/sbt-scoverage/issues/72
coverageHighlighting := {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 10)) => false
case _ => true
}
}
)

organization in ThisBuild := "org.typelevel"
Expand Down Expand Up @@ -96,14 +103,15 @@ lazy val catsSettings = commonSettings ++ publishSettings ++ scoverageSettings +
lazy val scalaCheckVersion = "1.13.4"
lazy val scalaTestVersion = "3.0.1"
lazy val disciplineVersion = "0.7.3"
lazy val catalystsVersion = "0.0.5"

lazy val disciplineDependencies = Seq(
libraryDependencies += "org.scalacheck" %%% "scalacheck" % scalaCheckVersion,
libraryDependencies += "org.typelevel" %%% "discipline" % disciplineVersion)

lazy val testingDependencies = Seq(
libraryDependencies += "org.typelevel" %%% "catalysts-platform" % "0.0.5",
libraryDependencies += "org.typelevel" %%% "catalysts-macros" % "0.0.5" % "test",
libraryDependencies += "org.typelevel" %%% "catalysts-platform" % catalystsVersion,
libraryDependencies += "org.typelevel" %%% "catalysts-macros" % catalystsVersion % "test",
libraryDependencies += "org.scalatest" %%% "scalatest" % scalaTestVersion % "test")


Expand Down Expand Up @@ -185,21 +193,22 @@ lazy val cats = project.in(file("."))

lazy val catsJVM = project.in(file(".catsJVM"))
.settings(moduleName := "cats")
.settings(noPublishSettings)
.settings(catsSettings)
.settings(commonJvmSettings)
.aggregate(macrosJVM, kernelJVM, kernelLawsJVM, coreJVM, lawsJVM, freeJVM, testsJVM, jvm, docs, bench)
.dependsOn(macrosJVM, kernelJVM, kernelLawsJVM, coreJVM, lawsJVM, freeJVM, testsJVM % "test-internal -> test", jvm, bench % "compile-internal;test-internal -> test")
.aggregate(macrosJVM, kernelJVM, kernelLawsJVM, coreJVM, lawsJVM, freeJVM, testkitJVM, testsJVM, jvm, docs, bench)
.dependsOn(macrosJVM, kernelJVM, kernelLawsJVM, coreJVM, lawsJVM, freeJVM, testkitJVM, testsJVM % "test-internal -> test", jvm, bench % "compile-internal;test-internal -> test")

lazy val catsJS = project.in(file(".catsJS"))
.settings(moduleName := "cats")
.settings(noPublishSettings)
.settings(catsSettings)
.settings(commonJsSettings)
.aggregate(macrosJS, kernelJS, kernelLawsJS, coreJS, lawsJS, freeJS, testsJS, js)
.dependsOn(macrosJS, kernelJS, kernelLawsJS, coreJS, lawsJS, freeJS, testsJS % "test-internal -> test", js)
.aggregate(macrosJS, kernelJS, kernelLawsJS, coreJS, lawsJS, freeJS, testkitJS, testsJS, js)
.dependsOn(macrosJS, kernelJS, kernelLawsJS, coreJS, lawsJS, freeJS, testkitJS, testsJS % "test-internal -> test", js)
.enablePlugins(ScalaJSPlugin)



lazy val macros = crossProject.crossType(CrossType.Pure)
.settings(moduleName := "cats-macros", name := "Cats macros")
.settings(catsSettings:_*)
Expand Down Expand Up @@ -289,18 +298,30 @@ lazy val freeJVM = free.jvm
lazy val freeJS = free.js

lazy val tests = crossProject.crossType(CrossType.Pure)
.dependsOn(macros, core, laws)
.dependsOn(testkit % "test")
.settings(moduleName := "cats-tests")
.settings(catsSettings:_*)
.settings(disciplineDependencies:_*)
.settings(noPublishSettings:_*)
.settings(testingDependencies: _*)
.jsSettings(commonJsSettings:_*)
.jvmSettings(commonJvmSettings:_*)

lazy val testsJVM = tests.jvm
lazy val testsJS = tests.js


lazy val testkit = crossProject.crossType(CrossType.Pure)
.dependsOn(macros, core, laws)
.settings(moduleName := "cats-testkit")
.settings(catsSettings:_*)
.settings(disciplineDependencies:_*)
.settings(
libraryDependencies += "org.scalatest" %%% "scalatest" % scalaTestVersion)
.jsSettings(commonJsSettings:_*)
.jvmSettings(commonJvmSettings:_*)

lazy val testkitJVM = testkit.jvm
lazy val testkitJS = testkit.js

// bench is currently JVM-only

lazy val bench = project.dependsOn(macrosJVM, coreJVM, freeJVM, lawsJVM)
Expand Down

0 comments on commit 3a83346

Please sign in to comment.