From 8a7b06a6066966f1d61ba434abc984cbd584453c Mon Sep 17 00:00:00 2001 From: Juan Pedro Moreno Date: Fri, 28 Apr 2017 17:45:14 +0200 Subject: [PATCH] Adds Coursier and Travis Cache (#255) * Adds coursier and Travis Cache * Empty commit for testing purposes * Disables coverage flag once tests are finished * Removes .ivy2 from cache travis section * Brings back .ivy2 to cache section in travis file --- .travis.yml | 17 +++++++++++++++++ project/ProjectPlugin.scala | 3 ++- project/plugins.sbt | 3 ++- project/project/plugins.sbt | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 project/project/plugins.sbt diff --git a/.travis.yml b/.travis.yml index 918c71d5..bfde77b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,3 +30,20 @@ script: after_success: - sbt ++$TRAVIS_SCALA_VERSION orgAfterCISuccess - bash <(curl -s https://codecov.io/bash) + +cache: + directories: + - $HOME/.sbt/0.13 + - $HOME/.sbt/boot/scala* + - $HOME/.sbt/cache + - $HOME/.sbt/launchers + - $HOME/.ivy2/cache + - $HOME/.coursier + +before_cache: +- du -h -d 1 $HOME/.ivy2/ +- du -h -d 2 $HOME/.sbt/ +- du -h -d 4 $HOME/.coursier/ +- find $HOME/.sbt -name "*.lock" -type f -delete +- find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete +- find $HOME/.coursier/cache -name "*.lock" -type f -delete diff --git a/project/ProjectPlugin.scala b/project/ProjectPlugin.scala index ee2da686..15dd4532 100644 --- a/project/ProjectPlugin.scala +++ b/project/ProjectPlugin.scala @@ -69,7 +69,8 @@ object ProjectPlugin extends AutoPlugin { (compile in Compile).asRunnableItemFull, (test in Test).asRunnableItemFull, (ScoverageKeys.coverageReport in Test).asRunnableItemFull, - (ScoverageKeys.coverageAggregate in Test).asRunnableItemFull + (ScoverageKeys.coverageAggregate in Test).asRunnableItemFull, + SetSetting(coverageEnabled in Global, false).asRunnableItem ) ++ guard(scalaBinaryVersion.value == "2.12")( (tut in ProjectRef(file("."), "docs")).asRunnableItem), resolvers += Resolver.sonatypeRepo("snapshots"), diff --git a/project/plugins.sbt b/project/plugins.sbt index 2839db5e..dd4b27c9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,3 @@ resolvers += Resolver.sonatypeRepo("releases") -addSbtPlugin("com.47deg" % "sbt-org-policies" % "0.4.17") +addSbtPlugin("com.47deg" % "sbt-org-policies" % "0.4.18") +addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC1") diff --git a/project/project/plugins.sbt b/project/project/plugins.sbt new file mode 100644 index 00000000..dfe274c0 --- /dev/null +++ b/project/project/plugins.sbt @@ -0,0 +1 @@ +addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC1")