-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
61 lines (50 loc) · 1.89 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
name := "cpg2"
ThisBuild / organization := "io.appthreat"
ThisBuild / version := "1.0.1"
ThisBuild / scalaVersion := "3.5.2"
// parsed by project/Versions.scala
val overflowdbVersion = "1.0.1"
val overflowdbCodegenVersion = "2.103"
ThisBuild / Test / fork := true
ThisBuild / Test / javaOptions += s"-Dlog4j2.configurationFile=file:${(ThisBuild / baseDirectory).value}/resources/log4j2-test.xml"
// If we fork we immediately stumble upon https://github.com/sbt/sbt/issues/3892 and https://github.com/sbt/sbt/issues/3892
ThisBuild / Test / javaOptions += s"-Duser.dir=${(ThisBuild / baseDirectory).value}"
publish / skip := true
ThisBuild / resolvers ++= Seq(
Resolver.mavenLocal,
Resolver.githubPackages("appthreat/overflowdb2"),
"Sonatype OSS".at("https://oss.sonatype.org/content/repositories/public")
)
ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
ThisBuild / versionScheme := Some("semver-spec")
lazy val schema = Projects.schema
lazy val domainClasses = Projects.domainClasses
lazy val protoBindings = Projects.protoBindings
lazy val codepropertygraph = Projects.codepropertygraph
lazy val schema2json = Projects.schema2json
ThisBuild / scalacOptions ++= Seq(
"-release",
"21",
"-deprecation"
)
ThisBuild / javacOptions ++= Seq(
"-g", // debug symbols
"-Xlint",
"--release", "21"
) ++ {
// fail early if users with JDK11 try to run this
val javaVersion = sys.props("java.specification.version").toFloat
assert(javaVersion.toInt >= 21, s"this build requires JDK21+ - you're using $javaVersion")
Nil
}
Global / onChangedBuildSource := ReloadOnSourceChanges
githubOwner := "appthreat"
githubRepository := "cpg2"
githubSuppressPublicationWarning := true
credentials +=
Credentials(
"GitHub Package Registry",
"maven.pkg.github.com",
"appthreat",
sys.env.getOrElse("GITHUB_TOKEN", "N/A")
)