Skip to content

Commit

Permalink
Cross build dc10-core
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpeeters committed Feb 19, 2024
1 parent 12e966e commit 3587311
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 16 deletions.
21 changes: 11 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
val Fs2V = "3.9.2"
val Fs2V = "3.9.4"
val SourcePosV = "1.1.0"

inThisBuild(List(
Expand Down Expand Up @@ -27,32 +27,33 @@ inThisBuild(List(
versionScheme := Some("semver-spec"),
))

lazy val dc10 = (project in file("."))
lazy val dc10 = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.in(file("."))
.settings(name := "dc10")
.aggregate(`dc10-core`, `dc10-io`)

lazy val `dc10-core` = (project in file("modules/core"))
.settings(
name := "dc10-core",
)
lazy val `dc10-core` = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.in(file("modules/core"))
.settings(name := "dc10-core")

lazy val `dc10-io` = (project in file("modules/io"))
lazy val `dc10-io` = crossProject(JVMPlatform)
.in(file("modules/io"))
.dependsOn(`dc10-core`)
.settings(
name := "dc10-io",
libraryDependencies ++= Seq(
"co.fs2" %% "fs2-io" % Fs2V
"co.fs2" %%% "fs2-io" % Fs2V
)
)

lazy val docs = project.in(file("docs/gitignored"))
.settings(
mdocOut := dc10.base,
mdocOut := file("."),
mdocVariables := Map(
"SCALA" -> crossScalaVersions.value.map(e => e.takeWhile(_ != '.')).mkString(", "),
"VERSION" -> version.value.takeWhile(_ != '+'),
)
)
.dependsOn(`dc10-core`, `dc10-io`)
.dependsOn(`dc10-core`.jvm, `dc10-io`.jvm)
.enablePlugins(MdocPlugin)
.enablePlugins(NoPublishPlugin)
2 changes: 1 addition & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
-----

### `dc10-core`
- Library for Scala @SCALA@ (JVM only)
- Library for Scala @SCALA@ (JS, JVM, and Native platforms)
- Bring your own AST

```scala
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dc10.io

import cats.effect.Concurrent
import cats.implicits.*
import cats.syntax.all.*
import dc10.compile.VirtualFile
import fs2.{Stream, text}
import fs2.io.file.{Files, Path}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dc10.io

import cats.effect.Concurrent
import cats.Foldable
import cats.implicits.*
import cats.syntax.all.*
import dc10.compile.{Compiler, Renderer}
import fs2.io.file.{Files, Path}

Expand Down
15 changes: 12 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.2")
addSbtPlugin("org.typelevel" % "sbt-typelevel-no-publish" % "0.6.6")
// cross
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.15.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17")

// docs
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.2")

// publish
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("org.typelevel" % "sbt-typelevel-no-publish" % "0.6.6")

0 comments on commit 3587311

Please sign in to comment.