This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
116 lines (105 loc) · 4.07 KB
/
build.sbt
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import sys.process.*
val scala3Version = "3.4.1"
val compilerOptions = Seq(
"-encoding",
"utf8",
"-feature",
"-unchecked",
"-deprecation",
"-language:implicitConversions",
"-Wvalue-discard",
"-Wunused:all"
// "-Xfatal-warnings"
// "-explain"
// "-Vprofile",
)
val kyoVersion = "0.10.2"
scalaVersion := scala3Version
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
sonatypeProfileName := "io.github.johnhungerford"
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
publish / skip := true
lazy val `zikyo-settings` = Seq(
fork := true,
scalaVersion := scala3Version,
crossScalaVersions := List(scala3Version),
scalacOptions ++= compilerOptions,
scalafmtOnCompile := true,
organization := "io.github.johnhungerford",
organizationName := "johnhungerford",
homepage := Some(url("https://getkyo.io")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer(
"johnhungerford",
"John Hungerford",
url("https://github.com/johnhungerford/")
)
),
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local",
sonatypeProfileName := "io.getkyo",
resolvers += "Sonatype OSS Snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots",
Test / testOptions += Tests.Argument("-oDG"),
ThisBuild / versionScheme := Some("early-semver"),
scalacOptions ++= Seq("-release:11"),
Test / javaOptions += "--add-opens=java.base/java.lang=ALL-UNNAMED",
libraryDependencies += "io.getkyo" %%% "kyo-core" % kyoVersion
)
lazy val skipPublish = Seq(
publishArtifact := false,
publish / skip := true,
Compile / packageBin / publishArtifact := false,
Compile / packageDoc / publishArtifact := false,
Compile / packageSrc / publishArtifact := false
)
lazy val zikyo =
crossProject(JVMPlatform)
.in(file("."))
.settings(
name := "zikyo",
organization := "io.github.johnhungerford",
scalaVersion := scala3Version,
skipPublish,
`zikyo-settings`
).aggregate(
`zikyo-core`,
`zikyo-examples`
)
lazy val `zikyo-core` =
crossProject(JSPlatform, JVMPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.in(file("zikyo-core"))
.settings(
`zikyo-settings`,
libraryDependencies += "org.scalatest" %%% "scalatest" % "3.2.16" % Test
)
.jsSettings(`js-settings`)
lazy val `zikyo-examples` =
crossProject(JVMPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.dependsOn(`zikyo-core`)
.in(file("zikyo-examples"))
.settings(
Compile / doc / sources := Seq.empty,
libraryDependencies += "com.softwaremill.sttp.tapir" %% "tapir-json-zio" % "1.10.0",
libraryDependencies += "io.getkyo" %% "kyo-direct" % kyoVersion,
libraryDependencies += "io.getkyo" %% "kyo-os-lib" % kyoVersion,
libraryDependencies += "io.getkyo" %% "kyo-tapir" % kyoVersion,
fork := true,
javaOptions ++= Seq(
"--add-opens=java.base/java.nio=ALL-UNNAMED",
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
),
skipPublish,
`zikyo-settings`
)
import org.scalajs.jsenv.nodejs.*
lazy val `js-settings` = Seq(
Compile / doc / sources := Seq.empty,
fork := false,
jsEnv := new NodeJSEnv(NodeJSEnv.Config().withArgs(List("--max_old_space_size=5120")))
)