1
- import de .heikoseeberger .sbtheader .{ HeaderPattern , HeaderPlugin }
1
+ import de .heikoseeberger .sbtheader .HeaderPlugin
2
2
import de .heikoseeberger .sbtheader .HeaderPlugin .autoImport ._
3
3
import sbt .Keys ._
4
4
import sbt .{Def , _ }
@@ -17,10 +17,19 @@ object ProjectPlugin extends AutoPlugin {
17
17
override def requires : Plugins = plugins.JvmPlugin && HeaderPlugin && OrgPoliciesPlugin
18
18
19
19
object autoImport {
20
- lazy val http4sV = " 0.15.7a"
20
+
21
+ object V {
22
+ lazy val http4s = " 0.20.10"
23
+ lazy val circe = " 0.11.1"
24
+ lazy val log4s = " 1.7.0"
25
+ lazy val scalatest = " 3.0.5"
26
+ lazy val roshttp = " 2.2.4"
27
+ lazy val slf4jSimple = " 1.7.28"
28
+ lazy val jwtCore = " 4.0.0"
29
+ }
21
30
22
31
lazy val dockerSettings = Seq (
23
- docker <<= docker dependsOn assembly,
32
+ docker := ( docker dependsOn assembly).value ,
24
33
dockerfile in docker := {
25
34
26
35
val artifact : File = assembly.value
@@ -59,11 +68,53 @@ object ProjectPlugin extends AutoPlugin {
59
68
)
60
69
}
61
70
71
+ lazy val serverHttpDependencies = Seq (
72
+ libraryDependencies ++= Seq (
73
+ %% (" circe-core" , V .circe),
74
+ %% (" circe-generic" , V .circe),
75
+ %% (" circe-parser" , V .circe),
76
+ %% (" log4s" , V .log4s),
77
+ % (" slf4j-simple" , V .slf4jSimple),
78
+ %% (" http4s-dsl" , V .http4s),
79
+ %% (" http4s-blaze-server" , V .http4s),
80
+ %% (" http4s-blaze-client" , V .http4s),
81
+ %% (" http4s-circe" , V .http4s),
82
+ % (" config" ),
83
+ %% (" jwt-core" , V .jwtCore),
84
+ %% (" scalatest" , V .scalatest) % " test"
85
+ ),
86
+ addSbtPlugin(" io.get-coursier" % " sbt-coursier" % " 2.0.0-RC3-2" )
87
+ )
88
+
62
89
lazy val buildInfoSettings = Seq (
63
90
buildInfoKeys := Seq [BuildInfoKey ](name, version, scalaVersion, sbtVersion),
64
91
buildInfoPackage := " org.scalaexercises.evaluator"
65
92
)
66
93
94
+ lazy val smoketestDependencies = Seq (
95
+ libraryDependencies ++= Seq (
96
+ %% (" circe-core" , V .circe),
97
+ %% (" circe-generic" , V .circe),
98
+ %% (" circe-parser" , V .circe),
99
+ %% (" http4s-blaze-client" , V .http4s),
100
+ %% (" http4s-circe" , V .http4s),
101
+ %% (" jwt-core" , V .jwtCore),
102
+ %% (" scalatest" , V .scalatest) % " test"
103
+ )
104
+ )
105
+
106
+ lazy val clientDependencies = Seq (
107
+ libraryDependencies ++= Seq (
108
+ %% (" http4s-blaze-client" , V .http4s),
109
+ %% (" http4s-circe" , V .http4s),
110
+ %% (" circe-core" , V .circe),
111
+ %% (" circe-generic" , V .circe),
112
+ %% (" circe-parser" , V .circe),
113
+ %% (" log4s" , V .log4s),
114
+ % (" slf4j-simple" , V .slf4jSimple),
115
+ %% (" scalatest" , V .scalatest) % " test"
116
+ ))
117
+
67
118
}
68
119
69
120
override def projectSettings : Seq [Def .Setting [_]] =
@@ -84,20 +135,21 @@ object ProjectPlugin extends AutoPlugin {
84
135
organizationEmail
= " [email protected] "
85
136
),
86
137
orgLicenseSetting := ApacheLicense ,
87
- scalaVersion := " 2.11.11 " ,
138
+ scalaVersion := " 2.12.10 " ,
88
139
scalaOrganization := " org.scala-lang" ,
89
140
javacOptions ++= Seq (" -encoding" , " UTF-8" , " -Xlint:-options" ),
90
141
fork in Test := false ,
91
142
parallelExecution in Test := false ,
92
143
cancelable in Global := true ,
93
- headers := Map (
94
- " scala " -> ( HeaderPattern .cStyleBlockComment,
95
- s """ |/*
144
+ headerLicense := Some (
145
+ HeaderLicense . Custom (
146
+ s """ |/*
96
147
| * scala-exercises - ${name.value}
97
148
| * Copyright (C) 2015-2016 47 Degrees, LLC. <http://www.47deg.com>
98
149
| */
99
150
|
100
- | """ .stripMargin)
101
- )
151
+ | """ .stripMargin
152
+ )),
153
+ headerMappings := headerMappings.value + (HeaderFileType .scala -> HeaderCommentStyle .CStyleBlockComment )
102
154
) ++ shellPromptSettings
103
155
}
0 commit comments