From 4bd0255f0a39d87652c032533ce45eb65e8f3b1e Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Sat, 4 Mar 2017 02:55:14 +0000 Subject: handle trying to package / publish with no source files via exception this saves us from having to do conditionals in several places --- stage2/BasicBuild.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'stage2/BasicBuild.scala') 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 = -- cgit v1.2.3