diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-13 14:36:54 -0500 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-13 14:41:41 -0500 |
commit | 8d2566b43440309d6737e1dfefbe0589b4a34017 (patch) | |
tree | 3b0ca3379d306c95e89209c7c0ecbc5c9c269bd8 /stage2/BasicBuild.scala | |
parent | de12007cc8907d98f183e65f50f2f9b4700894c3 (diff) | |
download | cbt-8d2566b43440309d6737e1dfefbe0589b4a34017.tar.gz cbt-8d2566b43440309d6737e1dfefbe0589b4a34017.tar.bz2 cbt-8d2566b43440309d6737e1dfefbe0589b4a34017.zip |
Assert right build class. Fixes #174
Diffstat (limited to 'stage2/BasicBuild.scala')
-rw-r--r-- | stage2/BasicBuild.scala | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala index d8d1b8b..3ce9ed1 100644 --- a/stage2/BasicBuild.scala +++ b/stage2/BasicBuild.scala @@ -18,8 +18,17 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge def enableConcurrency = false final def projectDirectory: File = lib.realpath(context.projectDirectory) assert( projectDirectory.exists, "projectDirectory does not exist: " ++ projectDirectory.string ) + assert( + projectDirectory.getName =!= "build" || + { + def transitiveInterfaces(cls: Class[_]): Vector[Class[_]] = cls.getInterfaces.toVector.flatMap(i => i +: transitiveInterfaces(i)) + transitiveInterfaces(this.getClass).contains(classOf[BuildBuildWithoutEssentials]) + }, + "You need to extend BuildBuild in: " + projectDirectory + "/build" + ) + final def usage: String = lib.usage(this.getClass, show) - + final def taskNames: String = lib.taskNames(this.getClass).sorted.mkString("\n") // ========== meta data ========== |