From 1d06921038c059fe2d235b1b06982d28d93742cd Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Sat, 6 May 2017 16:50:43 +0200 Subject: [PATCH 1/3] Fix typo --- project/CoursierSettings.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/CoursierSettings.scala b/project/CoursierSettings.scala index 0a833ee9e..37f4e9ad0 100644 --- a/project/CoursierSettings.scala +++ b/project/CoursierSettings.scala @@ -18,7 +18,7 @@ object CoursierSettings { } def sonatypeRepository(name: String) = { - resolvers += Resolver.sonatypeRepo("releases") + resolvers += Resolver.sonatypeRepo(name) } lazy val localM2Repository = { From efc280be06e1bcc69ca50b46493aa4882eb163b2 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Sat, 6 May 2017 16:55:27 +0200 Subject: [PATCH 2/3] Address javadoc warning --- core/shared/src/main/scala/coursier/util/Tree.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/shared/src/main/scala/coursier/util/Tree.scala b/core/shared/src/main/scala/coursier/util/Tree.scala index d391549dc..2e1cfe553 100644 --- a/core/shared/src/main/scala/coursier/util/Tree.scala +++ b/core/shared/src/main/scala/coursier/util/Tree.scala @@ -16,11 +16,11 @@ object Tree { def init[E, O](seq: Seq[E])(f: E => O) = seq.dropRight(1).map(f) - /** - * Add elements to the stack - * @param elems elements to add - * @param isLast a list that contains whether an element is the last in its siblings or not. - */ + /* + * Add elements to the stack + * @param elems elements to add + * @param isLast a list that contains whether an element is the last in its siblings or not. + */ def childrenWithLast(elems: Seq[T], isLast: Seq[Boolean]): Seq[(T, Seq[Boolean])] = { From 65d8c448ec0f47226512bcbc54be934d86992629 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Sat, 6 May 2017 16:55:59 +0200 Subject: [PATCH 3/3] Address sbt warning --- project/CoursierSettings.scala | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/project/CoursierSettings.scala b/project/CoursierSettings.scala index 37f4e9ad0..d45b234a7 100644 --- a/project/CoursierSettings.scala +++ b/project/CoursierSettings.scala @@ -70,26 +70,27 @@ object CoursierSettings { ) lazy val generatePropertyFile = - resourceGenerators.in(Compile) += { - (target, version).map { (dir, ver) => - import sys.process._ + resourceGenerators.in(Compile) += Def.task { + import sys.process._ + + val dir = target.value + val ver = version.value - val f = dir / "coursier.properties" - dir.mkdirs() + val f = dir / "coursier.properties" + dir.mkdirs() - val p = new java.util.Properties + val p = new java.util.Properties - p.setProperty("version", ver) - p.setProperty("commit-hash", Seq("git", "rev-parse", "HEAD").!!.trim) + p.setProperty("version", ver) + p.setProperty("commit-hash", Seq("git", "rev-parse", "HEAD").!!.trim) - val w = new java.io.FileOutputStream(f) - p.store(w, "Coursier properties") - w.close() + val w = new java.io.FileOutputStream(f) + p.store(w, "Coursier properties") + w.close() - println(s"Wrote $f") + println(s"Wrote $f") - Seq(f) - }.taskValue + Seq(f) } lazy val coursierPrefix = {