File tree 3 files changed +17
-5
lines changed
scala-sbt-0.13/explicitdeps
scala-sbt-1.0/explicitdeps
3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change
1
+ import sbt .ModuleID
2
+
1
3
package object explicitdeps {
2
4
3
5
type Binary = sbt.CrossVersion .Binary
@@ -22,4 +24,6 @@ package object explicitdeps {
22
24
def \@ (attributeName : String ): String = (nodeSeq \ (" @" + attributeName)).text
23
25
24
26
}
27
+
28
+ def modulePlatform (m : ModuleID ): Option [ScalaJSVersion ] = None
25
29
}
Original file line number Diff line number Diff line change
1
+ import sbt .librarymanagement .ModuleID
1
2
package object explicitdeps {
2
3
3
4
type Binary = sbt.librarymanagement.Binary
@@ -33,5 +34,16 @@ package object explicitdeps {
33
34
log.debug(s " Library dependencies: \n ${allLibraryDeps.mkString(" " , " \n " , " " )}" )
34
35
allLibraryDeps
35
36
}
37
+
38
+ def modulePlatform (moduleId : ModuleID ): Option [ScalaJSVersion ] =
39
+ moduleId.crossVersion match {
40
+ case b : sbt.librarymanagement.Binary =>
41
+ if (b.prefix == ScalaJSVersion .V1 .prefix)
42
+ Some (ScalaJSVersion .V1 )
43
+ else if (b.prefix == ScalaJSVersion .V06 .prefix)
44
+ Some (ScalaJSVersion .V06 )
45
+ else None
46
+ case _ => None
47
+ }
36
48
37
49
}
Original file line number Diff line number Diff line change @@ -119,11 +119,7 @@ object BoringStuff {
119
119
120
120
def moduleIDToDependency (moduleId : ModuleID ): Dependency = {
121
121
val isCross = moduleId.crossVersion.isInstanceOf [Binary ] || moduleId.crossVersion.isInstanceOf [Full ]
122
- val platform = moduleId.crossVersion match {
123
- case b : Binary if b.prefix == ScalaJSVersion .V1 .prefix => Some (ScalaJSVersion .V1 )
124
- case b : Binary if b.prefix == ScalaJSVersion .V06 .prefix => Some (ScalaJSVersion .V06 )
125
- case _ => None
126
- }
122
+ val platform = modulePlatform(moduleId)
127
123
128
124
Dependency (
129
125
moduleId.organization,
You can’t perform that action at this time.
0 commit comments