-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sbt
89 lines (78 loc) · 2.7 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
import scala.language.postfixOps
import Misc._
import Dependencies._
import org.typelevel.scalacoptions.ScalacOptions
Global / onChangedBuildSource := ReloadOnSourceChanges
Global / semanticdbEnabled := true
val scala3Version = "3.6.2"
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / scalaVersion := scala3Version
lazy val ultravioletVersion = "0.4.1-SNAPSHOT"
lazy val commonSettings: Seq[sbt.Def.Setting[_]] = Seq(
version := ultravioletVersion,
crossScalaVersions := Seq(scala3Version),
organization := "io.indigoengine",
libraryDependencies ++= Shared.munit.value,
scalacOptions ++= Seq("-language:strictEquality"),
// scalafixOnCompile := true, // Plays havoc with the sandbox, checked in CI.
// semanticdbEnabled := true, // Plays havoc with the sandbox, checked in CI.
autoAPIMappings := true,
logo := name.value,
Test / tpolecatExcludeOptions ++= Set(
ScalacOptions.warnValueDiscard,
ScalacOptions.warnUnusedImports,
ScalacOptions.warnUnusedLocals
)
)
lazy val neverPublish = Seq(
publish / skip := true,
publishLocal / skip := true
)
lazy val publishSettings = {
import xerial.sbt.Sonatype._
Seq(
publishTo := sonatypePublishToBundle.value,
publishMavenStyle := true,
sonatypeProfileName := "io.indigoengine",
licenses := Seq("MIT" -> url("https://opensource.org/licenses/MIT")),
sonatypeProjectHosting := Some(GitHubHosting("PurpleKingdomGames", "ultraviolet", "[email protected]")),
developers := List(
Developer(
id = "davesmith00000",
name = "David Smith",
email = "[email protected]",
url = url("https://github.com/davesmith00000")
)
),
sonatypeCredentialHost := "oss.sonatype.org",
sonatypeRepository := "https://oss.sonatype.org/service/local"
)
}
// Root
lazy val ultravioletProject =
(project in file("."))
.settings(
neverPublish,
commonSettings,
name := "UltravioletProject",
usefulTasks := customTasksAliases,
presentationSettings(version)
)
.aggregate(ultraviolet.js, ultraviolet.jvm)
// Shader
lazy val ultraviolet =
crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Full)
.in(file("ultraviolet"))
.settings(
name := "ultraviolet",
commonSettings ++ publishSettings,
Compile / sourceGenerators += shaderDSLGen.taskValue,
Compile / sourceGenerators += shaderTypeOfArrayGen.taskValue
)
def shaderDSLGen = Def.task {
ShaderDSLGen.makeShaderDSL((Compile / sourceManaged).value)
}
def shaderTypeOfArrayGen = Def.task {
ShaderTypeOfArrayGen.makeArrayInstances((Compile / sourceManaged).value)
}