-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
70 lines (65 loc) · 2.26 KB
/
build.sbt
File metadata and controls
70 lines (65 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import org.scalajs.linker.interface.{ESVersion, ModuleKind}
import org.scalajs.sbtplugin.ScalaJSPlugin
import scalajscrossproject.JSPlatform
import sbtcrossproject.CrossPlugin.autoImport.{CrossType, crossProject}
import sbtcrossproject.JVMPlatform
ThisBuild / version := "1.0.0"
ThisBuild / organization := "com.anjunar"
ThisBuild / organizationName := "Anjunar"
ThisBuild / organizationHomepage := Some(url("https://github.com/anjunar"))
ThisBuild / scalaVersion := "3.8.3"
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / homepage := Some(url("https://github.com/anjunar/scala-reflect"))
ThisBuild / description := "Compile-time reflection for Scala on JVM and Scala.js."
ThisBuild / licenses := List("MIT" -> url("https://opensource.org/licenses/MIT"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/anjunar/scala-reflect"),
"scm:git:[email protected]:anjunar/scala-reflect.git"
)
)
ThisBuild / developers := List(
Developer(
id = "anjunar",
name = "Anjunar",
email = "",
url = url("https://github.com/anjunar")
)
)
ThisBuild / pomIncludeRepository := { _ => false }
ThisBuild / publishMavenStyle := true
ThisBuild / publishTo := {
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
else localStaging.value
}
lazy val commonJsSettings = Seq(
scalaJSLinkerConfig ~= (
_.withModuleKind(ModuleKind.ESModule)
.withESFeatures(_.withESVersion(ESVersion.ES2021))
)
)
lazy val scalaReflect = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Full)
.in(file("."))
.configurePlatforms(JSPlatform)(_.withId("scala-reflect-js"))
.configurePlatforms(JVMPlatform)(_.withId("scala-reflect-jvm"))
.settings(
name := "scala-reflect",
moduleName := "scala-reflect"
)
.jsSettings(commonJsSettings)
.jvmSettings(
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.19" % Test
)
)
lazy val scalaReflectJs = scalaReflect.js
lazy val scalaReflectJvm = scalaReflect.jvm
lazy val root = Project(id = "scala-reflect-root", base = file("."))
.aggregate(scalaReflectJs, scalaReflectJvm)
.settings(
name := "scala-reflect",
moduleName := "scala-reflect",
publish / skip := true
)