From 59c9e1e4bfc45f843f89da22e0190d19403b4dc6 Mon Sep 17 00:00:00 2001 From: Katrin Shechtman Date: Mon, 13 Jun 2016 01:23:45 -0400 Subject: scalajs cross project support as plugin --- stage2/BasicBuild.scala | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'stage2') 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: _* ) -- cgit v1.2.3