Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop publishing cats all bundle , start to publish cats-testkit #1758

Merged
merged 2 commits into from
Jul 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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