aboutsummaryrefslogtreecommitdiff
path: root/stage2/BasicBuild.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-11-13 14:36:54 -0500
committerChristopher Vogt <oss.nsp@cvogt.org>2016-11-13 14:41:41 -0500
commit8d2566b43440309d6737e1dfefbe0589b4a34017 (patch)
tree3b0ca3379d306c95e89209c7c0ecbc5c9c269bd8 /stage2/BasicBuild.scala
parentde12007cc8907d98f183e65f50f2f9b4700894c3 (diff)
downloadcbt-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.scala11
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 ==========