Skip to content

Commit

Permalink
Merge pull request #10 from imjulioc/feat/cross-target-support
Browse files Browse the repository at this point in the history
feat: cross target support
  • Loading branch information
4kimov authored Aug 21, 2024
2 parents bddff78 + 45767a1 commit 87b5244
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 9 deletions.
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
target/
.bloop
.bsp
.metals
.vscode

metals.sbt
project/project

target
build
26 changes: 18 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,22 @@ ThisBuild / crossScalaVersions := supportedScalaVersions
ThisBuild / scalaVersion := scala213
ThisBuild / tlSonatypeUseLegacyHost := false

lazy val sqids = project
.in(file("."))
.settings(
name := "sqids",
headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax,
libraryDependencies ++= Seq(
"org.scalameta" %% "munit-scalacheck" % "0.7.29" % Test
lazy val root =
project
.in(file("."))
.settings(
publish / skip := true
)
.aggregate(core.jvm, core.native, core.js)

lazy val core =
crossProject(JVMPlatform, NativePlatform, JSPlatform)
.crossType(CrossType.Pure)
.in(file("core"))
.settings(
name := "sqids",
headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax,
libraryDependencies ++= Seq(
"org.scalameta" %%% "munit-scalacheck" % "1.0.0" % Test
)
)
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package sqids

import munit.ScalaCheckSuite

import sqids.options.Alphabet

class AlphabetSuite extends ScalaCheckSuite {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
*/

package sqids

import munit.ScalaCheckSuite

import sqids.options.Blocklist
import sqids.options.SqidsOptions
import sqids.options.Alphabet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package sqids

import munit.ScalaCheckSuite

import sqids.options.SqidsOptions
import sqids.options.Alphabet

Expand Down
6 changes: 6 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.22")

addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.4")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")

0 comments on commit 87b5244

Please sign in to comment.