forked from codacy/codacy-analysis-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
59 lines (54 loc) · 1.8 KB
/
build.sbt
File metadata and controls
59 lines (54 loc) · 1.8 KB
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
import sbt.Keys._
import sbt._
val scalaBinaryVersionNumber = "2.12"
val scalaVersionNumber = s"$scalaBinaryVersionNumber.4"
resolvers += Resolver.bintrayIvyRepo("sbt", "sbt-plugin-releases")
lazy val codacyAnalysisCli = project
.in(file("."))
.enablePlugins(JavaAppPackaging)
.enablePlugins(DockerPlugin)
.settings(
inThisBuild(
List(
organization := "com.codacy",
scalaVersion := scalaVersionNumber,
version := "0.1.0-SNAPSHOT",
scalacOptions ++= Common.compilerFlags,
scalacOptions in Test ++= Seq("-Yrangepos"),
scalacOptions in (Compile, console) --= Seq("-Ywarn-unused:imports", "-Xfatal-warnings"))),
name := "codacy-analysis-cli",
// App Dependencies
libraryDependencies ++= Seq(
Dependencies.caseApp,
Dependencies.betterFiles,
Dependencies.jodaTime,
Dependencies.codacyPlugins,
Dependencies.fansi,
Dependencies.scalajHttp,
Dependencies.cats) ++
Dependencies.circe ++
Dependencies.jackson ++
Dependencies.log4s,
// Test Dependencies
libraryDependencies ++= Dependencies.specs2.map(_ % Test))
.settings(Common.dockerSettings: _*)
.settings(Common.genericSettings: _*)
// Scapegoat
scalaVersion in ThisBuild := scalaVersionNumber
scalaBinaryVersion in ThisBuild := scalaBinaryVersionNumber
scapegoatDisabledInspections in ThisBuild := Seq()
scapegoatVersion in ThisBuild := "1.3.4"
compile.in(Compile) := Def.taskDyn {
val c = compile.in(Compile).value
Def.task {
if (sys.env.get("CI").exists(_.nonEmpty)) Def.taskDyn(Def.task(scapegoat.in(Compile).value))
c
}
}.value
compile.in(Test) := Def.taskDyn {
val c = compile.in(Test).value
Def.task {
if (sys.env.get("CI").exists(_.nonEmpty)) Def.taskDyn(Def.task(scapegoat.in(Compile).value))
c
}
}.value