-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.sbt
More file actions
136 lines (117 loc) · 4.38 KB
/
build.sbt
File metadata and controls
136 lines (117 loc) · 4.38 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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name := "scex"
inThisBuild(Seq(
organization := "com.avsystem.scex",
scalaVersion := "2.13.18",
githubWorkflowTargetTags ++= Seq("v*"),
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"), JavaSpec.temurin("21"), JavaSpec.temurin("25")),
githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))),
githubWorkflowPublish := Seq(WorkflowStep.Sbt(
List("ci-release"),
env = Map(
"PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}",
"PGP_SECRET" -> "${{ secrets.PGP_SECRET }}",
"SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}",
"SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}"
)
)),
))
val CompileAndTest = "compile->compile;test->test"
val parserCombinatorsVersion = "2.4.0"
val avsCommonsVersion = "2.27.1"
val slf4jVersion = "2.0.17"
val logbackVersion = "1.5.32" // Tests only
val commonsLang3Version = "3.20.0"
val commonsCodecVersion = "1.21.0"
val guavaVersion = "33.6.0-jre"
val commonsNetVersion = "3.13.0"
val scalatestVersion = "3.2.20"
val noPublishSettings = Seq(
publish / skip := true
)
lazy val subprojectSettings = Seq(
crossVersion := CrossVersion.full,
javacOptions ++= Seq(
"--release", "17",
"-parameters"
),
scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-unchecked",
"-language:implicitConversions",
"-language:existentials",
"-language:dynamics",
"-language:experimental.macros",
"-Xfatal-warnings",
"-Xlint:-missing-interpolator,-adapted-args,-unused,_"
),
scalacOptions ++= Seq(
"-Xnon-strict-patmat-analysis",
"-Xlint:-strict-unsealed-patmat"
),
projectInfo := ModuleInfo(
nameFormal = "SCEX",
description = "Extensible, fast and secure Scala expression evaluation engine",
homepage = Some(url("https://github.com/AVSystem/scex")),
startYear = Some(2015),
organizationName = "AVSystem",
organizationHomepage = Some(url("http://www.avsystem.com/")),
scmInfo = Some(ScmInfo(
browseUrl = url("https://github.com/AVSystem/scex.git"),
connection = "scm:git:git@github.com:AVSystem/scex.git",
devConnection = Some("scm:git:git@github.com:AVSystem/scex.git")
)),
licenses = Vector(License.MIT),
developers = Vector(
Developer("ddworak", "Dawid Dworak", "d.dworak@avsystem.com", url("https://github.com/ddworak")),
),
),
publishMavenStyle := true,
pomIncludeRepository := { _ => false },
Test / fork := true,
Test / javaOptions += "-Xmx1G",
Test / outputStrategy := Some(LoggedOutput(new Logger {
def log(level: Level.Value, message: => String): Unit = ()
def success(message: => String): Unit = ()
def trace(t: => Throwable): Unit = ()
})),
libraryDependencies ++= Seq(
compilerPlugin("com.avsystem.commons" %% "commons-analyzer" % avsCommonsVersion),
"org.scalatest" %% "scalatest" % scalatestVersion % Test
),
Compile / doc / sources := Seq.empty
)
lazy val scex = project.in(file("."))
.aggregate(`scex-macros`, `scex-core`, `scex-util`, `scex-test`)
.settings(noPublishSettings: _*)
lazy val `scex-macros` = project
.settings(subprojectSettings: _*)
.settings(
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
libraryDependencies += "com.avsystem.commons" %% "commons-macros" % avsCommonsVersion
)
lazy val `scex-core` = project.dependsOn(`scex-macros` % CompileAndTest)
.settings(subprojectSettings: _*)
.settings(
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
"org.scala-lang.modules" %% "scala-parser-combinators" % parserCombinatorsVersion,
"com.avsystem.commons" %% "commons-core" % avsCommonsVersion,
"org.slf4j" % "slf4j-api" % slf4jVersion,
"commons-codec" % "commons-codec" % commonsCodecVersion,
"com.google.guava" % "guava" % guavaVersion,
"ch.qos.logback" % "logback-classic" % logbackVersion % Test,
)
)
lazy val `scex-util` = project.dependsOn(`scex-core` % CompileAndTest)
.settings(subprojectSettings: _*)
.settings(
libraryDependencies ++= Seq(
"org.apache.commons" % "commons-lang3" % commonsLang3Version,
"commons-net" % "commons-net" % commonsNetVersion,
)
)
lazy val `scex-test` = project.dependsOn(`scex-core` % CompileAndTest, `scex-util`)
.settings(subprojectSettings: _*)
.settings(noPublishSettings: _*)