diff options
author | Jan Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-13 15:23:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-13 15:23:21 -0500 |
commit | 9664f3e22156ab159e310f31720082b417dcf03e (patch) | |
tree | 4d0c2ffa40e14e239a415a53bb7faef2302de204 /stage2/BasicBuild.scala | |
parent | 336475c2f16ce3689b121884584049470c1f9d67 (diff) | |
parent | 293a1816e32a3f62fd5effa950386a02ca130c18 (diff) | |
download | cbt-9664f3e22156ab159e310f31720082b417dcf03e.tar.gz cbt-9664f3e22156ab159e310f31720082b417dcf03e.tar.bz2 cbt-9664f3e22156ab159e310f31720082b417dcf03e.zip |
Merge pull request #311 from cvogt/remove-dot-copy
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 3ce9ed1..3b1ea19 100644 --- a/stage2/BasicBuild.scala +++ b/stage2/BasicBuild.scala @@ -40,8 +40,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] = |