aboutsummaryrefslogtreecommitdiff
path: root/stage2/BasicBuild.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-03-04 02:55:14 +0000
committerChristopher Vogt <oss.nsp@cvogt.org>2017-03-04 20:43:13 -0500
commit4bd0255f0a39d87652c032533ce45eb65e8f3b1e (patch)
tree48704575b2b337feeeb457f7ab985fc5912e9c33 /stage2/BasicBuild.scala
parent8d4d1b0f0b984ea39a92094e775e82bbb2bd9863 (diff)
downloadcbt-4bd0255f0a39d87652c032533ce45eb65e8f3b1e.tar.gz
cbt-4bd0255f0a39d87652c032533ce45eb65e8f3b1e.tar.bz2
cbt-4bd0255f0a39d87652c032533ce45eb65e8f3b1e.zip
handle trying to package / publish with no source files via exception
this saves us from having to do conditionals in several places
Diffstat (limited to 'stage2/BasicBuild.scala')
-rw-r--r--stage2/BasicBuild.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala
index 7d36445..b6a2870 100644
--- a/stage2/BasicBuild.scala
+++ b/stage2/BasicBuild.scala
@@ -94,6 +94,10 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge
/** Absolute path names for all individual files found in sources directly or contained in directories. */
final def sourceFiles: Seq[File] = lib.sourceFiles(sources, sourceFileFilter)
+ final def nonEmptySourceFiles: Seq[File] =
+ if(sourceFiles.nonEmpty) {
+ throw new RuntimeException( "no source files found" )
+ } else sourceFiles
protected def logEmptySourceDirectories(): Unit = {
val nonExisting =