-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
95 lines (80 loc) · 3.18 KB
/
build.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
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
/*
* Copyright 2017 TEAM PER LA TRASFORMAZIONE DIGITALE
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Versions._
import Environment._
import uk.gov.hmrc.gitstamp.GitStampPlugin._
organization := "it.gov.daf"
name := "common"
Seq(gitStampSettings: _*)
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8", // yes, this is 2 args
"-feature",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Ywarn-dead-code",
"-Xfuture"
)
wartremoverErrors ++= Warts.allBut(Wart.Equals, Wart.ImplicitParameter, Wart.Overloading)
lazy val root = (project in file(".")).enablePlugins(AutomateHeaderPlugin)
scalaVersion := "2.11.8"
/*
val hadoopExcludes =
(moduleId: ModuleID) => moduleId.
exclude("org.slf4j", "slf4j-log4j12").
exclude("org.slf4j", "slf4j-api").
exclude("javax.servlet", "servlet-api")
val hadoopLibraries = Seq(
hadoopExcludes("org.apache.hadoop" % "hadoop-client" % hadoopVersion % Compile)
)
*/
val playLibraries = Seq(
"io.swagger" %% "swagger-play2" % "1.5.3",
"org.typelevel" %% "cats-core" % catsVersion,
"org.typelevel" %% "cats-effect" % catsEffectVersion,
"com.typesafe.play" %% "play-cache" % playVersion,
"com.typesafe.play" %% "filters-helpers" % playVersion,
"com.typesafe.play" %% "play-ws" % playVersion,
"com.github.cb372" %% "scalacache-guava" % "0.9.4",
"org.pac4j" % "play-pac4j" % playPac4jVersion,
"org.pac4j" % "pac4j-http" % pac4jVersion,
"org.pac4j" % "pac4j-jwt" % pac4jVersion exclude("commons-io", "commons-io"),
"org.pac4j" % "pac4j-ldap" % pac4jVersion,
"commons-codec" % "commons-codec" % "1.11"
)
//libraryDependencies ++= hadoopLibraries ++ playLibraries
libraryDependencies ++= playLibraries
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
// "cloudera" at "https://repository.cloudera.com/artifactory/cloudera-repos/"
)
licenses += ("Apache-2.0", new URL("https://www.apache.org/licenses/LICENSE-2.0.txt"))
headerLicense := Some(HeaderLicense.ALv2("2017 - 2018", "TEAM PER LA TRASFORMAZIONE DIGITALE"))
headerMappings := headerMappings.value + (HeaderFileType.conf -> HeaderCommentStyle.HashLineComment)
publishTo := {
if (isSnapshot.value)
Some("snapshots" at nexus + "maven-snapshots/")
else
Some("releases" at nexus + "maven-releases/")
}
publishMavenStyle := true
autoAPIMappings := true
credentials += Credentials { Path.userHome / ".ivy2" / ".credentials" }
// credentials += {if(isStaging) Credentials(Path.userHome / ".ivy2" / ".credentialsTest") else Credentials(Path.userHome / ".ivy2" / ".credentials")}