forked from rtfpessoa/codacy-cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.sbt
More file actions
executable file
·42 lines (38 loc) · 1.38 KB
/
build.sbt
File metadata and controls
executable file
·42 lines (38 loc) · 1.38 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
import com.typesafe.sbt.packager.docker.Cmd
ThisBuild / scalaVersion := "2.13.16"
val cppcheckVersion: String = {
val source = scala.io.Source.fromFile("Dockerfile.base")
try {
val prefix = "ARG toolVersion="
source.getLines.find(_.startsWith(prefix)).get.stripPrefix(prefix)
} finally {
source.close()
}
}
lazy val `doc-generator` = project
.settings(
Compile / sourceGenerators += Def.task {
val file = (Compile / sourceManaged).value / "codacy" / "cppcheck" / "Versions.scala"
IO.write(file, s"""package codacy.cppcheck
|object Versions {
| val cppcheckVersion: String = "$cppcheckVersion"
|}
|""".stripMargin)
Seq(file)
}.taskValue,
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % "2.4.0",
"com.github.pathikrit" %% "better-files" % "3.9.2",
"org.playframework" %% "play-json" % "3.0.5"
)
)
lazy val root = project
.in(file("."))
.settings(
name := "codacy-cppcheck",
libraryDependencies ++= Seq("com.codacy" %% "codacy-engine-scala-seed" % "6.1.5"),
mainClass in Compile := Some("codacy.Engine"),
nativeImageOptions ++= List("-O1", "-H:+ReportExceptionStackTraces", "--no-fallback", "--no-server", "--static")
)
.enablePlugins(NativeImagePlugin)
.enablePlugins(JavaAppPackaging)