-
Notifications
You must be signed in to change notification settings - Fork 4
/
catnip.sbt
70 lines (61 loc) · 2.76 KB
/
catnip.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import sbt._
import Settings._
import sbtcrossproject.CrossPlugin.autoImport.{ crossProject, CrossType }
lazy val root = project.root
.setName("catnip")
.setDescription("Catnip build")
.configureRoot
.noPublish
.aggregate(catnipJVM, catnipJS, catnipCustomTestsJVM, catnipCustomTestsJS, catnipTestsJVM, catnipTestsJS)
lazy val catnip = crossProject(JVMPlatform, JSPlatform).crossType(CrossType.Pure).build.from("catnip")
.setName("catnip")
.setDescription("Macro annotations for Kittens library")
.setInitialImport("cats.implicits._, alleycats.std.all._")
.configureModule
.publish
lazy val catnipJVM = catnip.jvm
.settings(Compile / unmanagedResourceDirectories += baseDirectory.value / "../src/main/resources")
lazy val catnipJS = catnip.js
.settings(Compile / unmanagedResourceDirectories += baseDirectory.value / "../src/main/resources")
lazy val catnipCustomTests = crossProject(JVMPlatform, JSPlatform).crossType(CrossType.Pure).build.from("catnip-custom-example")
.setName("catnip-custom-example")
.setDescription("Example for custom derivation")
.setInitialImport("cats.implicits._, alleycats.std.all._")
.dependsOn(catnip)
.configureModule
.noPublish
lazy val catnipCustomTestsJVM = catnipCustomTests.jvm
.settings(Compile / unmanagedResourceDirectories += baseDirectory.value / "../src/main/resources")
lazy val catnipCustomTestsJS = catnipCustomTests.js
.settings(Compile / unmanagedResourceDirectories += baseDirectory.value / "../src/main/resources")
lazy val catnipTests = crossProject(JVMPlatform, JSPlatform).crossType(CrossType.Pure).build.from("catnip-tests")
.setName("catnip-tests")
.setDescription("Catnip tests")
.setInitialImport("cats.implicits._, alleycats.std.all._")
.dependsOn(catnip, catnipCustomTests)
.configureModule
.configureTests()
.noPublish
.settings(libraryDependencies ++= Seq(
"org.specs2" %%% "specs2-core" % Dependencies.specs2Version.value % "test",
"org.specs2" %%% "specs2-scalacheck" % Dependencies.specs2Version.value % "test"
))
lazy val catnipTestsJVM = catnipTests.jvm
lazy val catnipTestsJS = catnipTests.js
lazy val readme = scalatex.ScalatexReadme(
projectId = "readme",
wd = file(""),
url = "https://github.com/scalalandio/catnip/tree/master",
source = "Readme"
)
.configureModule
.noPublish
.enablePlugins(GhpagesPlugin)
.settings(
scalaVersion := "2.12.11", // there is no ScalaTex for 2.13
siteSourceDirectory := target.value / "scalatex",
git.remoteRepo := "git@github.com:scalalandio/catnip.git",
Jekyll / makeSite / includeFilter := new FileFilter { def accept(p: File) = true }
)
addCommandAlias("fullTest", ";test;scalastyle")
addCommandAlias("fullCoverageTest", ";coverage;test;coverageReport;coverageAggregate;scalastyle")