Skip to content

Commit

Permalink
don't make java libs depend on Scala (avoiding conflicts)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvogt committed Nov 8, 2017
1 parent 52736f4 commit 6df0ae9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cbt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ if [ ! "$DEBUG" == "" ]; then
shift
fi

if [ -z ${JAVA_OPTS_CBT+x} ]; then
# shellcheck disable=SC2153
if [ -z "${JAVA_OPTS_CBT+x}" ]; then
_JAVA_OPTS_CBT=($DEBUG -Xmx1536m -Xss10M "-XX:MaxJavaStackTraceDepth=-1" -XX:+TieredCompilation "-XX:TieredStopAtLevel=1" -Xverify:none)
else
_JAVA_OPTS_CBT=($DEBUG $JAVA_OPTS_CBT)
Expand Down
6 changes: 6 additions & 0 deletions compatibility/build/build.scala
Original file line number Diff line number Diff line change
@@ -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()
}
11 changes: 11 additions & 0 deletions nailgun_launcher/build/build.scala
Original file line number Diff line number Diff line change
@@ -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()
}
2 changes: 1 addition & 1 deletion stage1/resolver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6df0ae9

Please sign in to comment.