forked from input-output-hk/scalanet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sc
129 lines (106 loc) · 4.02 KB
/
build.sc
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import mill._
import mill.modules._
import scalalib._
import ammonite.ops._
import coursier.maven.MavenRepository
import mill.scalalib.{PublishModule, ScalaModule}
import mill.scalalib.publish.{Developer, License, PomSettings, VersionControl}
import $ivy.`com.lihaoyi::mill-contrib-buildinfo:0.4.1`
// ScoverageModule creates bug when using custom repositories:
// https://github.com/lihaoyi/mill/issues/620
//object scalanet extends ScalaModule with PublishModule with ScoverageModule {
object scalanet extends ScalaModule with PublishModule {
def scalaVersion = "2.12.7"
def publishVersion = "0.1.5-SNAPSHOT"
override def repositories =
super.repositories ++ Seq(
MavenRepository("https://oss.sonatype.org/content/repositories/releases"),
MavenRepository("https://oss.sonatype.org/content/repositories/snapshots")
)
override def scalacOptions = Seq(
"-unchecked",
"-language:postfixOps",
"-deprecation",
"-feature",
"-Xfatal-warnings",
"-Xlint:unsound-match",
"-Ywarn-inaccessible",
"-Ywarn-unused-import",
"-Ypartial-unification",
"-J-Xmx1.5G",
"-J-Xms1.5G",
"-J-XX:MaxMetaspaceSize=512m",
"-encoding",
"utf-8"
)
override def ivyDeps = Agg(
ivy"io.monix::monix:3.0.0",
ivy"com.chuusai::shapeless:2.3.3",
ivy"org.slf4j:slf4j-api:1.7.25",
ivy"io.netty:netty-all:4.1.31.Final",
ivy"org.eclipse.californium:scandium:2.0.0-M15",
ivy"org.eclipse.californium:element-connector:2.0.0-M15",
ivy"org.scodec::scodec-bits:1.1.12",
ivy"org.scodec::scodec-core:1.11.4",
ivy"org.scala-lang.modules::scala-parser-combinators:1.1.2"
)
def pomSettings = PomSettings(
description =
"Asynchronous, strongly typed, resource-managed networking library, written in Scala with support for a variety of network technologies",
organization = "io.iohk",
url = "https://github.com/input-output-hk/scalanet",
licenses = Seq(License.`Apache-2.0`),
versionControl = VersionControl.github("input-output-hk", "scalanet"),
developers = Seq()
)
def scoverageVersion = "1.3.1"
trait TestModule extends Tests {
override def ivyDeps = Agg(
ivy"org.scalatest::scalatest:3.0.5",
ivy"org.scalacheck::scalacheck:1.14.0",
ivy"ch.qos.logback:logback-core:1.2.3",
ivy"ch.qos.logback:logback-classic:1.2.3",
ivy"org.mockito:mockito-core:2.21.0"
)
override def moduleDeps: Seq[JavaModule] = super.moduleDeps ++ Seq(scalanet)
def testFrameworks = Seq("org.scalatest.tools.Framework")
def single(args: String*) = T.command {
super.runMain("org.scalatest.run", args: _*)
}
}
// Scoverage disabled
// object test extends ScoverageTests {
object test extends TestModule
object it extends TestModule
object examples extends ScalaModule {
override def scalaVersion = "2.12.7"
override def scalacOptions = scalanet.scalacOptions
override def repositories = scalanet.repositories
override def moduleDeps: Seq[JavaModule] = super.moduleDeps ++ Seq(scalanet)
override def ivyDeps = Agg(
ivy"ch.qos.logback:logback-core:1.2.3",
ivy"ch.qos.logback:logback-classic:1.2.3",
ivy"org.mockito:mockito-core:2.21.0",
ivy"com.github.pureconfig::pureconfig:0.11.1",
ivy"com.github.scopt::scopt:3.7.1",
ivy"org.scodec::scodec-bits:1.1.6",
ivy"io.monix::monix:3.0.0",
ivy"org.scala-lang.modules::scala-parser-combinators:1.1.2"
)
object test extends Tests {
override def ivyDeps = Agg(
ivy"org.scalatest::scalatest:3.0.5",
ivy"org.scalacheck::scalacheck:1.14.0",
ivy"ch.qos.logback:logback-core:1.2.3",
ivy"ch.qos.logback:logback-classic:1.2.3",
ivy"org.mockito:mockito-core:2.21.0",
ivy"org.scodec::scodec-bits:1.1.6"
)
override def moduleDeps: Seq[JavaModule] = super.moduleDeps ++ Seq(scalanet)
def testFrameworks = Seq("org.scalatest.tools.Framework")
def single(args: String*) = T.command {
super.runMain("org.scalatest.run", args: _*)
}
}
}
}