From a21d7dec94a210311b5728477a6f4da498156d4d Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Thu, 11 Jan 2018 12:39:11 +0000 Subject: [PATCH] Add, configure & enforce sbt-whitesource --- .travis.yml | 16 ++++++++++++---- build.sbt | 9 +++++++++ project/plugins.sbt | 5 +++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 796ceaa60..3b529232f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,16 @@ matrix: - scala: 2.12.4 jdk: oraclejdk9 -script: - - sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M "++$TRAVIS_SCALA_VERSION" mimaReportBinaryIssues scalafmt::test test:scalafmt::test test +script: sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M + ++$TRAVIS_SCALA_VERSION + mimaReportBinaryIssues + scalafmt::test test:scalafmt::test + whitesourceCheckPolicies + test + +env: + global: + - secure: JzxepvrNQIem+7MS8pBfBkcWDgt/oNKOreI3GJMJDN9P7lxCmrW0UVhpSftscjRzz9gXGQleqZ8t/I0hqysY9nO/DlxDQil6FKpsqrEKALdIsez8TjtbOlV69enDl6SBCXpg1B/rTQ/dL9mpV3WMvNkmDOhcNmbNyfO9Uk8wAAEvGQNKyE02s0gjZf6IgfOHXInBB2o3+uQFiWCABFHDWInN4t0QZVEhF/3P3iDKEfauWGwugf/YKLrwUUzNyN+J1i1goYEWZvviP+KCNbPlEsVN60In8F0t+jYuBJb0ePNcl3waT/4xBKQRidB4XRbhOXrZIATdpHLnzKzk2TPf3GxijNEscKYGdq3v6nWd128rfHGYz528pRSZ8bNOdQJotB/bJTmIEOnk5P9zU0z4z2cawMF6EyBJka7kXnC9Vz6TpifvyXDpzfmRzAkBrD6PC+diGPbyy5+4zvhpZuv31MRjMckohyNb76pR9qq70yDlomn+nVNoZ1fpp7dCqwjIxm9h2UjCWzXWY4xSByI8/CaPibq6Ma7RWHQE+4NGG2CCLQrqN4NB+BFsH3R0l5Js9khvDuEUYJkgSmJMFluXranWRV+pp/YMxk1IT4rOEPOc/hIqlQTrxasp/QxeyAfRk9OPzoz9L2kR0RH4ch3KuaARUv03WFNarfQ/ISz3P/s= cache: directories: @@ -19,5 +27,5 @@ cache: - $HOME/.sbt before_cache: - - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete - - find $HOME/.sbt -name "*.lock" -print -delete + - find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete + - find $HOME/.sbt -name "*.lock" -delete diff --git a/build.sbt b/build.sbt index 412d7b65f..5945c0429 100644 --- a/build.sbt +++ b/build.sbt @@ -187,3 +187,12 @@ def customCommands: Seq[Setting[_]] = Seq( state } ) + +inThisBuild(Seq( + whitesourceProduct := "Lightbend Reactive Platform", + whitesourceAggregateProjectName := "sbt-util-master", + whitesourceAggregateProjectToken := "b9b11b2f43d34c44b28d8922624eef07a3f1b20d95ad45a5b5d973513ab173f4", + whitesourceIgnoredScopes += "scalafmt", + whitesourceFailOnError := sys.env.contains("WHITESOURCE_PASSWORD"), // fail if pwd is present + whitesourceForceCheckAllDependencies := true, +)) diff --git a/project/plugins.sbt b/project/plugins.sbt index b85b1f525..7f3392433 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,3 @@ -addSbtPlugin("org.scala-sbt" % "sbt-houserules" % "0.3.5") -addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.3.2") +addSbtPlugin("org.scala-sbt" % "sbt-houserules" % "0.3.5") +addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.3.2") +addSbtPlugin("com.lightbend" % "sbt-whitesource" % "0.1.9")