diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-12 18:56:20 -0500 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-13 15:05:23 -0500 |
commit | 293a1816e32a3f62fd5effa950386a02ca130c18 (patch) | |
tree | c5720481edbaa89cac6dcd6b9eee6fe54b359f02 /stage2/BasicBuild.scala | |
parent | de12007cc8907d98f183e65f50f2f9b4700894c3 (diff) | |
download | cbt-293a1816e32a3f62fd5effa950386a02ca130c18.tar.gz cbt-293a1816e32a3f62fd5effa950386a02ca130c18.tar.bz2 cbt-293a1816e32a3f62fd5effa950386a02ca130c18.zip |
reduce usage of .copy as preparation to replace it with newBuild
Diffstat (limited to 'stage2/BasicBuild.scala')
-rw-r--r-- | stage2/BasicBuild.scala | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala index d8d1b8b..d4aa49d 100644 --- a/stage2/BasicBuild.scala +++ b/stage2/BasicBuild.scala @@ -31,8 +31,16 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge final def crossScalaVersionsArray: Array[String] = crossScalaVersions.to def projectName = "default" - // TODO: this should probably provide a nice error message if class has constructor signature - def copy(context: Context): BuildInterface = lib.copy(this.getClass, context).asInstanceOf[BuildInterface] + // TODO: get rid of this in favor of newBuild. + // currently blocked on DynamicOverride being not parts + // of core but being part of plugin essentials while + // callNullary in lib needing .copy . + def copy(context: Context): BuildInterface = + this.getClass + .getConstructor(classOf[Context]) + .newInstance(context) + .asInstanceOf[BuildInterface] + def zincVersion = constants.zincVersion def dependencies: Seq[Dependency] = |