From ec48d96b98eb4d2ac8eaaa445796f644fee0b14b Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Wed, 8 Nov 2017 17:56:36 +0100 Subject: [PATCH] don't make java libs depend on Scala (avoiding conflicts) --- compatibility/build/build.scala | 6 ++++++ nailgun_launcher/build/build.scala | 11 +++++++++++ stage1/resolver.scala | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 compatibility/build/build.scala create mode 100644 nailgun_launcher/build/build.scala diff --git a/compatibility/build/build.scala b/compatibility/build/build.scala new file mode 100644 index 00000000..22fc0d66 --- /dev/null +++ b/compatibility/build/build.scala @@ -0,0 +1,6 @@ +package cbt_build.compatibility +import cbt._ +class Build(val context: Context) extends BaseBuild{ + // don't depend on Scala, not needed + override def dependencies = Seq() +} diff --git a/nailgun_launcher/build/build.scala b/nailgun_launcher/build/build.scala new file mode 100644 index 00000000..f1e25af4 --- /dev/null +++ b/nailgun_launcher/build/build.scala @@ -0,0 +1,11 @@ +package cbt_build.nailgun_launcher +import cbt._ +class Build(val context: Context) extends BaseBuild{ + // nailgun launcher doesn't need Scala. In fact not + // removing it here will lead to conflicts when + // is is loaded as a DirectoryDependency in + // loadCustomBuildWithDifferentCbtVersion + // because depending on a specific scala version conflicts + // with whatever scala version the host cbt runs + override def dependencies = Seq() +} diff --git a/stage1/resolver.scala b/stage1/resolver.scala index bdbd03d6..3d7463d5 100644 --- a/stage1/resolver.scala +++ b/stage1/resolver.scala @@ -296,7 +296,7 @@ case class BoundMavenDependency( file } - private def resolveHash(suffix: String, useClassifier: Boolean) = { + private def resolveHash(suffix: String, useClassifier: Boolean): String = { val path = resolve( suffix ++ ".sha1", None, useClassifier ).toPath Option( classLoaderCache.hashMap.get("hash:"+path) ).map(_.asInstanceOf[String]).getOrElse{ val result = Files.readAllLines(