-
Notifications
You must be signed in to change notification settings - Fork 291
/
build.sbt
89 lines (74 loc) · 3.38 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
name := "joern"
ThisBuild / organization := "io.joern"
ThisBuild / scalaVersion := "3.4.3"
val cpgVersion = "1.7.13"
lazy val joerncli = Projects.joerncli
lazy val querydb = Projects.querydb
lazy val console = Projects.console
lazy val dataflowengineoss = Projects.dataflowengineoss
lazy val macros = Projects.macros
lazy val semanticcpg = Projects.semanticcpg
lazy val c2cpg = Projects.c2cpg
lazy val ghidra2cpg = Projects.ghidra2cpg
lazy val x2cpg = Projects.x2cpg
lazy val pysrc2cpg = Projects.pysrc2cpg
lazy val php2cpg = Projects.php2cpg
lazy val jssrc2cpg = Projects.jssrc2cpg
lazy val javasrc2cpg = Projects.javasrc2cpg
lazy val jimple2cpg = Projects.jimple2cpg
lazy val kotlin2cpg = Projects.kotlin2cpg
lazy val rubysrc2cpg = Projects.rubysrc2cpg
lazy val gosrc2cpg = Projects.gosrc2cpg
lazy val swiftsrc2cpg = Projects.swiftsrc2cpg
lazy val csharpsrc2cpg = Projects.csharpsrc2cpg
ThisBuild / libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-api" % Versions.slf4j,
"org.apache.logging.log4j" % "log4j-slf4j2-impl" % Versions.log4j % Optional,
"org.apache.logging.log4j" % "log4j-core" % Versions.log4j % Optional
// `Optional` means "not transitive", but still included in "stage/lib"
)
ThisBuild / compile / javacOptions ++= Seq(
"-g", // debug symbols
"-Xlint",
"--release=11"
) ++ {
// fail early if users with JDK8 try to run this
val javaVersion = sys.props("java.specification.version").toFloat
assert(javaVersion.toInt >= 11, s"this build requires JDK11+ - you're using $javaVersion")
Nil
}
ThisBuild / scalacOptions ++= Seq(
"-deprecation", // Emit warning and location for usages of deprecated APIs.
"--release",
"11",
"-Wshadow:type-parameter-shadow",
)
lazy val createDistribution = taskKey[File]("Create a complete Joern distribution")
createDistribution := {
val distributionFile = file("target/joern-cli.zip")
val zip = (joerncli / Universal / packageBin).value
IO.copyFile(zip, distributionFile)
val querydbDistribution = (querydb / createDistribution).value
println(s"created distribution - resulting files: $distributionFile")
distributionFile
}
ThisBuild / resolvers ++= Seq(
Resolver.mavenLocal,
"Sonatype OSS" at "https://oss.sonatype.org/content/repositories/public",
"Atlassian" at "https://packages.atlassian.com/mvn/maven-atlassian-external",
"Gradle Releases" at "https://repo.gradle.org/gradle/libs-releases/"
)
ThisBuild / Test / fork := true
Global / onChangedBuildSource := ReloadOnSourceChanges
// publishing info for sonatype / maven central
ThisBuild / publishTo := sonatypePublishToBundle.value
ThisBuild / sonatypeCredentialHost := xerial.sbt.Sonatype.sonatypeCentralHost
ThisBuild / scmInfo := Some(ScmInfo(url("https://github.com/joernio/joern"), "scm:[email protected]:joernio/joern.git"))
ThisBuild / homepage := Some(url("https://joern.io/"))
ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
ThisBuild / developers := List(
/* sonatype requires this to be non-empty */
Developer("fabsx00", "Fabian Yamaguchi", "[email protected]", url("https://github.com/fabsx00"))
)
publish / skip := true // don't publish the root project
ThisBuild / Test / packageBin / publishArtifact := true