Skip to content

Commit f42f71e

Browse files
committed
Support for cross-building with Scala Native
1 parent c8aa03d commit f42f71e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ OsgiKeys.exportPackage := Seq(s"<exported package>;version=${version.value}")
6161

6262
Scala versions are defined in `.travis.yml`.
6363

64-
Cross-building with Scala.js is possible, see scala-xml for example.
64+
Cross-building with Scala.js and Scala Native is possible, see scala-xml or scala-parser-combinators for example.
6565

6666
These additional settings are enabled by `scalaModuleSettings`:
6767
- `scalacOptions in (Compile, compile) ++= Seq("-feature", "-deprecation", "-unchecked", "-Xlint")`

src/main/scala/ScalaModulePlugin.scala

+4-3
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ object ScalaModulePlugin extends AutoPlugin {
4040
// The staging profile is called `org.scala-lang`, the default is `org.scala-lang.modules`
4141
sonatypeProfileName := "org.scala-lang",
4242

43-
// The staging repository name. The default is `[sbt-sonatype] name version`. We cross-build
44-
// using parallel travis jobs, so we include the Scala/Scala.js versions to make them unique.
43+
// The staging repository name. The default is `[sbt-sonatype] name version`. We include the
44+
// Scala/Scala.js/Scala Native versions to avoid conflicts when running the travis jobs.
4545
sonatypeSessionName := {
4646
val sjs = Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).map(v => s" Scala.js $v").getOrElse("")
47-
s"${sonatypeSessionName.value} Scala ${scalaVersion.value}$sjs"
47+
val native = Option(System.getenv("SCALANATIVE_VERSION")).filter(_.nonEmpty).map(v => s" Scala Native $v").getOrElse("")
48+
s"${sonatypeSessionName.value} Scala ${scalaVersion.value}$sjs$native"
4849
},
4950
)
5051

0 commit comments

Comments
 (0)