-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1067: Add a simple CrossProject mechanism
- Loading branch information
Showing
6 changed files
with
497 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
sbt-plugin/src/main/scala/scala/scalajs/sbtplugin/cross/CrossClasspathDependency.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* __ *\ | ||
** ________ ___ / / ___ __ ____ Scala.js sbt plugin ** | ||
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** | ||
** __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \ http://scala-js.org/ ** | ||
** /____/\___/_/ |_/____/_/ | |__/ /____/ ** | ||
** |/____/ ** | ||
\* */ | ||
|
||
|
||
package org.scalajs.sbtplugin.cross | ||
|
||
import sbt._ | ||
|
||
final class CrossClasspathDependency( | ||
val project: CrossProject, | ||
val configuration: Option[String] | ||
) { | ||
def jvm: ClasspathDependency = ClasspathDependency(project.jvm, configuration) | ||
def js: ClasspathDependency = ClasspathDependency(project.js, configuration) | ||
} | ||
|
||
object CrossClasspathDependency { | ||
final class Constructor(crossProject: CrossProject) { | ||
def %(conf: Configuration): CrossClasspathDependency = %(conf.name) | ||
|
||
def %(conf: String): CrossClasspathDependency = | ||
new CrossClasspathDependency(crossProject, Some(conf)) | ||
} | ||
} |
Oops, something went wrong.