From a85a944088f5d355e4d5ec5af567028adcdf9ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0est=C3=A1k=20V=C3=ADt?= Date: Tue, 3 Jan 2017 14:34:49 +0100 Subject: [PATCH] Added SonarQube plugin to build.sbt --- build.sbt | 5 ++++- project/plugins.sbt | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 6e6eae5..ca02054 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ name := """odc-analyzer""" version := "1.0-SNAPSHOT" -lazy val root = (project in file(".")).enablePlugins(PlayScala) +lazy val root = (project in file(".")).enablePlugins(PlayScala).enablePlugins(SonarRunnerPlugin) scalaVersion := "2.11.8" @@ -98,6 +98,9 @@ routesImport += "binders.QueryBinders._" // other, legacy style, accesses its actions statically. routesGenerator := InjectedRoutesGenerator +val sonarEnvPrefix = sys.props.getOrElse("sonarEnvPrefix", "sonar_") + +sonarProperties ++= sys.env.filter(_._1.startsWith(sonarEnvPrefix)).map{case (k, v) => k.drop(sonarEnvPrefix.length).replace('_', '.') -> v} scalacOptions ++= Seq( "-deprecation", // Emit warning and location for usages of deprecated APIs. diff --git a/project/plugins.sbt b/project/plugins.sbt index ff32627..db671c0 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -14,3 +14,7 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.7") addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.0") addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0") + +// Other plugins + +addSbtPlugin("com.aol.sbt" % "sbt-sonarrunner-plugin" % "1.0.4") \ No newline at end of file