diff options
author | Katrin Shechtman <katrin.shechtman@gmail.com> | 2016-06-13 01:23:45 -0400 |
---|---|---|
committer | Katrin Shechtman <katrin.shechtman@gmail.com> | 2016-06-13 11:48:05 -0400 |
commit | 59c9e1e4bfc45f843f89da22e0190d19403b4dc6 (patch) | |
tree | c754e73fa8ac7f7363dd5a66521e17ef1dbab03d /stage2 | |
parent | b69826c7bc44573f01366ef472a59def6e4f1fc5 (diff) | |
download | cbt-59c9e1e4bfc45f843f89da22e0190d19403b4dc6.tar.gz cbt-59c9e1e4bfc45f843f89da22e0190d19403b4dc6.tar.bz2 cbt-59c9e1e4bfc45f843f89da22e0190d19403b4dc6.zip |
scalajs cross project support as plugin
Diffstat (limited to 'stage2')
-rw-r--r-- | stage2/BasicBuild.scala | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala index ee552a5..978f604 100644 --- a/stage2/BasicBuild.scala +++ b/stage2/BasicBuild.scala @@ -39,9 +39,10 @@ class BasicBuild(val context: Context) extends DependencyImplementation with Bui def defaultScalaVersion: String = constants.scalaVersion final def scalaVersion = context.scalaVersion getOrElse defaultScalaVersion - final def scalaMajorVersion: String = lib.scalaMajorVersion(scalaVersion) + final def scalaMajorVersion: String = lib.libMajorVersion(scalaVersion) def crossScalaVersions: Seq[String] = Seq(scalaVersion, "2.10.6") 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] @@ -79,17 +80,14 @@ class BasicBuild(val context: Context) extends DependencyImplementation with Bui /** Absolute path names for all individual files found in sources directly or contained in directories. */ final def sourceFiles: Seq[File] = lib.sourceFiles(sources) - protected def assertSourceDirectories(): Unit = { + protected def logEmptySourceDirectories(): Unit = { val nonExisting = sources .filterNot( _.exists ) .diff( Seq(defaultSourceDirectory) ) - assert( - nonExisting.isEmpty, - "Some sources do not exist: \n"++nonExisting.mkString("\n") - ) + if(!nonExisting.isEmpty) logger.stage2("Some sources do not exist: \n"++nonExisting.mkString("\n")) } - assertSourceDirectories() + logEmptySourceDirectories() def Resolver( urls: URL* ) = MavenResolver( context.cbtHasChanged, context.paths.mavenCache, urls: _* ) |