diff options
-rw-r--r-- | compatibility/BuildInterface.java | 4 | ||||
-rw-r--r-- | compatibility/Dependency.java | 3 | ||||
-rw-r--r-- | stage1/Stage1Lib.scala | 2 | ||||
-rw-r--r-- | stage1/cbt.scala | 5 | ||||
-rw-r--r-- | stage1/resolver.scala | 6 |
5 files changed, 12 insertions, 8 deletions
diff --git a/compatibility/BuildInterface.java b/compatibility/BuildInterface.java index e2b5f36..ebcfb99 100644 --- a/compatibility/BuildInterface.java +++ b/compatibility/BuildInterface.java @@ -2,11 +2,11 @@ package cbt; import java.io.*; public abstract class BuildInterface implements Dependency{ - public abstract BuildInterface copy(Context context); // needed to configure builds - public abstract String scalaVersion(); // needed to propagate scalaVersion to dependent builds public abstract BuildInterface finalBuild(); // needed to propagage through build builds. Maybe we can get rid of this. public abstract File[] triggerLoopFilesArray(); // needed for watching files across composed builds // deprecated methods, which clients are still allowed to implement, but not required + public abstract BuildInterface copy(Context context); + public abstract String scalaVersion(); public abstract String[] crossScalaVersionsArray(); } diff --git a/compatibility/Dependency.java b/compatibility/Dependency.java index 1f719c2..e23faa6 100644 --- a/compatibility/Dependency.java +++ b/compatibility/Dependency.java @@ -13,11 +13,12 @@ public interface Dependency{ // methods that exist for longer which every CBT version in use should have by now, no default values needed public abstract String show(); public abstract Dependency[] dependenciesArray(); - public abstract File[] dependencyClasspathArray(); public abstract File[] exportedClasspathArray(); // deprecated methods @java.lang.Deprecated public abstract boolean needsUpdateCompat(); + @java.lang.Deprecated + public abstract File[] dependencyClasspathArray(); } diff --git a/stage1/Stage1Lib.scala b/stage1/Stage1Lib.scala index 4f3f592..5a2f05d 100644 --- a/stage1/Stage1Lib.scala +++ b/stage1/Stage1Lib.scala @@ -413,7 +413,7 @@ ${sourceFiles.sorted.mkString(" \\\n")} case d => d } - def classLoaderRecursion( dependency: Dependency, latest: Map[(String,String),Dependency], cache: ClassLoaderCache ): ClassLoader = { + def classLoaderRecursion( dependency: Dependency, latest: Map[(String,String),Dependency], cache: ClassLoaderCache)(implicit transientCache: java.util.Map[AnyRef,AnyRef] ): ClassLoader = { // FIXME: shouldn't we be using KeyLockedLazyCache instead of hashmap directly here? val dependencies = dependency.dependencies val dependencyClassLoader: ClassLoader = { diff --git a/stage1/cbt.scala b/stage1/cbt.scala index dd06d81..a1776b1 100644 --- a/stage1/cbt.scala +++ b/stage1/cbt.scala @@ -52,9 +52,10 @@ object `package`{ } implicit class DependencyExtensions(subject: Dependency){ import subject._ - def dependencyClasspath: ClassPath = ClassPath(dependencyClasspathArray.to) + def dependencyClasspath(implicit logger: Logger, transientCache: java.util.Map[AnyRef,AnyRef]): ClassPath + = Dependencies(dependenciesArray.to).classpath def exportedClasspath: ClassPath = ClassPath(exportedClasspathArray.to) - def classpath = exportedClasspath ++ dependencyClasspath + def classpath(implicit logger: Logger, transientCache: java.util.Map[AnyRef,AnyRef]) = exportedClasspath ++ dependencyClasspath def dependencies: Seq[Dependency] = dependenciesArray.to } implicit class ContextExtensions(subject: Context){ diff --git a/stage1/resolver.scala b/stage1/resolver.scala index e6e4588..97cd36a 100644 --- a/stage1/resolver.scala +++ b/stage1/resolver.scala @@ -19,13 +19,15 @@ trait DependencyImplementation extends Dependency{ protected lazy val taskCache = new PerClassCache(transientCache, moduleKey) private[cbt] def targetClasspath: ClassPath - def dependencyClasspathArray: Array[File] = dependencyClasspath.files.toArray def exportedClasspathArray: Array[File] = exportedClasspath.files.toArray def exportedClasspath: ClassPath def dependenciesArray: Array[Dependency] = dependencies.to - @deprecated("this method is replaced by lastModifiedCompat","") + @deprecated("this method was replaced by lastModifiedCompat","") def needsUpdateCompat = true + @deprecated("this method was replaced by dependenciesArray","") + def dependencyClasspathArray = dependencyClasspath.files.toArray + /* //private type BuildCache = KeyLockedLazyCache[Dependency, Future[ClassPath]] |