7
7
8
8
Cross-platform compilation support for sbt.
9
9
10
+ Requirements:
11
+
12
+ * sbt 0.13.17+ or 1.2.1+
13
+ * For ` JSPlatform ` : Scala.js 0.6.23+ or 1.0.0-M2+
14
+ * For ` NativePlatform ` : Scala Native 0.3.7+
15
+
10
16
<h2 >Installation</h2 >
11
17
12
18
<h3 >Cross-Compiling Scala.js, JVM and Native</h3 >
13
19
14
20
In ` project/plugins.sbt ` :
15
21
16
22
``` scala
17
- addSbtPlugin(" org.portable-scala" % " sbt-scalajs-crossproject" % " 0.5 .0" )
18
- addSbtPlugin(" org.portable-scala" % " sbt-scala-native-crossproject" % " 0.5 .0" )
23
+ addSbtPlugin(" org.portable-scala" % " sbt-scalajs-crossproject" % " 0.6 .0" )
24
+ addSbtPlugin(" org.portable-scala" % " sbt-scala-native-crossproject" % " 0.6 .0" )
19
25
addSbtPlugin(" org.scala-js" % " sbt-scalajs" % " 0.6.23" )
20
26
addSbtPlugin(" org.scala-native" % " sbt-scala-native" % " 0.3.7" )
21
27
```
@@ -38,6 +44,7 @@ lazy val bar =
38
44
// configure Scala-Native settings
39
45
.nativeSettings(/* ... */ ) // defined in sbt-scala-native
40
46
47
+ // Optional in sbt 1.x (mandatory in sbt 0.13.x)
41
48
lazy val barJS = bar.js
42
49
lazy val barJVM = bar.jvm
43
50
lazy val barNative = bar.native
@@ -49,6 +56,7 @@ lazy val foo =
49
56
libraryDependencies += " org.example" %%% " foo" % " 1.2.3"
50
57
)
51
58
59
+ // Optional in sbt 1.x (mandatory in sbt 0.13.x)
52
60
lazy val fooJS = foo.js
53
61
lazy val fooJVM = foo.jvm
54
62
lazy val fooNative = foo.native
@@ -66,6 +74,7 @@ lazy val bar =
66
74
.crossType(...)
67
75
.settings(...)
68
76
77
+ // Optional in sbt 1.x (mandatory in sbt 0.13.x)
69
78
lazy val barJS = bar.js
70
79
lazy val barJVM = bar.jvm
71
80
lazy val barNative = bar.native
@@ -90,7 +99,7 @@ Note that *inside the build*, you still need to use `barJVM` to the JVM `Project
90
99
In ` project/plugins.sbt ` :
91
100
92
101
``` scala
93
- addSbtPlugin(" org.portable-scala" % " sbt-scala-native-crossproject" % " 0.5 .0" )
102
+ addSbtPlugin(" org.portable-scala" % " sbt-scala-native-crossproject" % " 0.6 .0" )
94
103
addSbtPlugin(" org.scala-native" % " sbt-scala-native" % " 0.3.7" )
95
104
```
96
105
@@ -108,6 +117,7 @@ lazy val bar =
108
117
// configure Scala-Native settings
109
118
.nativeSettings(/* ... */ ) // defined in sbt-scala-native
110
119
120
+ // Optional in sbt 1.x (mandatory in sbt 0.13.x)
111
121
lazy val barJVM = bar.jvm
112
122
lazy val barNative = bar.native
113
123
```
@@ -119,7 +129,7 @@ We carefully implemented sbt-crossproject to be mostly source compatible with Sc
119
129
In ` project/plugins.sbt ` :
120
130
121
131
``` scala
122
- addSbtPlugin(" org.portable-scala" % " sbt-scalajs-crossproject" % " 0.5 .0" )
132
+ addSbtPlugin(" org.portable-scala" % " sbt-scalajs-crossproject" % " 0.6 .0" )
123
133
addSbtPlugin(" org.scala-js" % " sbt-scalajs" % " 0.6.23" )
124
134
```
125
135
@@ -137,6 +147,7 @@ lazy val bar =
137
147
.jsSettings(/* ... */ ) // defined in sbt-scalajs-crossproject
138
148
.jvmSettings(/* ... */ )
139
149
150
+ // Optional in sbt 1.x (mandatory in sbt 0.13.x)
140
151
lazy val barJS = bar.js
141
152
lazy val barJVM = bar.jvm
142
153
```
0 commit comments