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