Skip to content

Commit

Permalink
Update zstd-jni to 1.5.6-6
Browse files Browse the repository at this point in the history
  • Loading branch information
scala-steward committed Sep 24, 2024
1 parent 1c6bf43 commit 882b562
Showing 1 changed file with 60 additions and 84 deletions.
144 changes: 60 additions & 84 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name := "flatgraph"
name := "flatgraph"
ThisBuild / organization := "io.joern"
ThisBuild / scalaVersion := scala3

val slf4jVersion = "2.0.7"
val scala3 = "3.4.2"
val scala2_12 = "2.12.18"
val scala3 = "3.4.2"
val scala2_12 = "2.12.18"

/** Only the below listed projects are included in things like `sbt compile`.
* We explicitly want to exclude `benchmarks` which requires qwiet.ai / shiftleft
* internal repositories. */
/** Only the below listed projects are included in things like `sbt compile`. We explicitly want to exclude `benchmarks` which requires
* qwiet.ai / shiftleft internal repositories.
*/
lazy val root = (project in file(".")).aggregate(
core,
help,
Expand All @@ -19,17 +19,17 @@ lazy val root = (project in file(".")).aggregate(
odbConvert,
testSchemas,
testSchemasDomainClasses,
tests,
tests
)

lazy val core = project
.in(file("core"))
.settings(
name := "flatgraph-core",
libraryDependencies ++= Seq(
"com.lihaoyi" %% "ujson" % "3.3.1",
"com.github.luben" % "zstd-jni" % "1.5.6-3",
"org.slf4j" % "slf4j-api" % slf4jVersion,
"com.lihaoyi" %% "ujson" % "3.3.1",
"com.github.luben" % "zstd-jni" % "1.5.6-6",
"org.slf4j" % "slf4j-api" % slf4jVersion
)
)

Expand All @@ -38,10 +38,7 @@ lazy val help = project
.dependsOn(core)
.settings(
name := "flatgraph-help",
libraryDependencies ++= Seq(
"de.vandermeer" % "asciitable" % "0.3.2",
"net.oneandone.reflections8" % "reflections8" % "0.11.7",
)
libraryDependencies ++= Seq("de.vandermeer" % "asciitable" % "0.3.2", "net.oneandone.reflections8" % "reflections8" % "0.11.7")
)

lazy val formats = project
Expand All @@ -50,10 +47,10 @@ lazy val formats = project
.settings(
name := "flatgraph-formats",
libraryDependencies ++= Seq(
"com.github.tototoshi" %% "scala-csv" % "1.4.0",
"org.scala-lang.modules" %% "scala-xml" % "2.3.0",
"io.spray" %% "spray-json" % "1.3.6",
"com.github.scopt" %% "scopt" % "4.1.0",
"com.github.tototoshi" %% "scala-csv" % "1.4.0",
"org.scala-lang.modules" %% "scala-xml" % "2.3.0",
"io.spray" %% "spray-json" % "1.3.6",
"com.github.scopt" %% "scopt" % "4.1.0"
)
)

Expand All @@ -64,54 +61,50 @@ lazy val tests = project
.in(file("tests"))
.dependsOn(core, formats, help, testSchemasDomainClasses)
.settings(
name := "flatgraph-tests",
name := "flatgraph-tests",
publish / skip := true,
libraryDependencies ++= Seq(
"com.github.pathikrit" %% "better-files" % "3.9.2" % Test,
"org.scalamock" %% "scalamock" % "6.0.0" % Test
),
libraryDependencies ++= Seq("com.github.pathikrit" %% "better-files" % "3.9.2" % Test, "org.scalamock" %% "scalamock" % "6.0.0" % Test)
)


lazy val domainClassesGenerator_3 = project
.in(file("domain-classes-generator_3"))
.settings(
name := "flatgraph-domain-classes-generator",
name := "flatgraph-domain-classes-generator",
sourceDirectory := baseDirectory.value / "../domain-classes-generator/src",
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-simple" % slf4jVersion % Optional,
"com.lihaoyi" %% "os-lib" % "0.9.1",
"org.apache.commons" % "commons-text" % "1.10.0",
"com.github.scopt" %% "scopt" % "4.1.0",
("org.scalameta" %% "scalafmt-dynamic" % "3.7.17").cross(CrossVersion.for3Use2_13),
),
"org.slf4j" % "slf4j-simple" % slf4jVersion % Optional,
"com.lihaoyi" %% "os-lib" % "0.9.1",
"org.apache.commons" % "commons-text" % "1.10.0",
"com.github.scopt" %% "scopt" % "4.1.0",
("org.scalameta" %% "scalafmt-dynamic" % "3.7.17").cross(CrossVersion.for3Use2_13)
)
)

lazy val domainClassesGenerator_2_12 = project
.in(file("domain-classes-generator_2.12"))
.settings(
name := "flatgraph-domain-classes-generator",
name := "flatgraph-domain-classes-generator",
sourceDirectory := baseDirectory.value / "../domain-classes-generator/src",
scalaVersion := scala2_12,
scalacOptions := scalacOptionsFor2_12,
scalaVersion := scala2_12,
scalacOptions := scalacOptionsFor2_12,
libraryDependencies ++= Seq(
"org.slf4j"% "slf4j-simple" % slf4jVersion % Optional,
"com.lihaoyi" %% "os-lib" % "0.9.1",
"org.apache.commons" % "commons-text" % "1.10.0",
"com.github.scopt" %% "scopt" % "4.1.0",
"org.scalameta" %% "scalafmt-dynamic" % "3.7.17",
),
"org.slf4j" % "slf4j-simple" % slf4jVersion % Optional,
"com.lihaoyi" %% "os-lib" % "0.9.1",
"org.apache.commons" % "commons-text" % "1.10.0",
"com.github.scopt" %% "scopt" % "4.1.0",
"org.scalameta" %% "scalafmt-dynamic" % "3.7.17"
)
)

lazy val sbtPlugin = project
.in(file("sbt-flatgraph"))
.dependsOn(domainClassesGenerator_2_12)
.enablePlugins(SbtPlugin)
.settings(
name := "sbt-flatgraph",
scalaVersion := scala2_12,
name := "sbt-flatgraph",
scalaVersion := scala2_12,
scalacOptions := scalacOptionsFor2_12,
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2"),
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
)

lazy val odbConvert = project
Expand All @@ -120,52 +113,47 @@ lazy val odbConvert = project
.enablePlugins(JavaAppPackaging)
.settings(
name := "flatgraph-odb-convert",
libraryDependencies ++= Seq(
"io.shiftleft" %% "overflowdb-core" % "1.181",
"org.slf4j" % "slf4j-simple" % slf4jVersion % Optional
)
libraryDependencies ++= Seq("io.shiftleft" %% "overflowdb-core" % "1.181", "org.slf4j" % "slf4j-simple" % slf4jVersion % Optional)
)

lazy val testSchemas = project
.in(file("test-schemas"))
.dependsOn(domainClassesGenerator_3)
.settings(
name := "test-schemas",
scalaVersion := scala3,
name := "test-schemas",
scalaVersion := scala3,
publish / skip := true,
generateDomainClassesForTestSchemas := Def.taskDyn {
/** invoking the codegen and scalafmt is expensive, so we only want to do so if the hashsum of the
* inputs (codegen implementation, build setup, test schemas, scalafmt config) is unknown or different to the
* last known one. We persist the hashsum to preserve it between sbt sessions.
*/
val lastKnownHashsumFile = target.value / "codegen-inputs-hash.md5"

/** invoking the codegen and scalafmt is expensive, so we only want to do so if the hashsum of the inputs (codegen implementation,
* build setup, test schemas, scalafmt config) is unknown or different to the last known one. We persist the hashsum to preserve it
* between sbt sessions.
*/
val lastKnownHashsumFile = target.value / "codegen-inputs-hash.md5"
def lastKnownHashsum: Option[String] = scala.util.Try(IO.read(lastKnownHashsumFile)).toOption
val inputsHashsum = FileUtils.md5(
sourceDirectory.value,
file("build.sbt"),
(ThisBuild / baseDirectory).value / "domain-classes-generator/src",
)
val inputsHashsum =
FileUtils.md5(sourceDirectory.value, file("build.sbt"), (ThisBuild / baseDirectory).value / "domain-classes-generator/src")

if (lastKnownHashsum == Some(inputsHashsum)) {
Def.task {
streams.value.log.info("no need to regenerate domain classes for test schemas")
}
} else {
Def.task {
(Compile/runMain).toTask(s" flatgraph.testdomains.GenerateDomainClasses").value
(Compile / runMain).toTask(s" flatgraph.testdomains.GenerateDomainClasses").value
IO.write(lastKnownHashsumFile, inputsHashsum)
}
}
}.value,
}.value
)

lazy val testSchemasDomainClasses = project
.in(file("test-schemas-domain-classes"))
.dependsOn(core, help)
.settings(
name := "test-schemas-domain-classes",
Compile/compile := (Compile/compile).dependsOn(testSchemas/generateDomainClassesForTestSchemas).value,
publish / skip := true,
name := "test-schemas-domain-classes",
Compile / compile := (Compile / compile).dependsOn(testSchemas / generateDomainClassesForTestSchemas).value,
publish / skip := true
)

// currently relies on a self-published version of codepropertygraph and joern based on the respective `michael/flatgraph` branches
Expand All @@ -188,26 +176,16 @@ lazy val benchmarks = project
),
publish / skip := true
)
*/

*/

ThisBuild / libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-simple" % slf4jVersion % Test,
"org.scalatest" %% "scalatest" % "3.2.18" % Test,
"org.slf4j" % "slf4j-simple" % slf4jVersion % Test,
"org.scalatest" %% "scalatest" % "3.2.18" % Test
)

ThisBuild / scalacOptions ++= Seq(
"-deprecation",
"-feature",
"--release", "8",
"-language:implicitConversions"
)
ThisBuild / scalacOptions ++= Seq("-deprecation", "-feature", "--release", "8", "-language:implicitConversions")

val scalacOptionsFor2_12 = Seq(
"-deprecation",
"-feature",
"-language:implicitConversions"
)
val scalacOptionsFor2_12 = Seq("-deprecation", "-feature", "-language:implicitConversions")

ThisBuild / compile / javacOptions ++= Seq(
"-g", // debug symbols
Expand All @@ -217,12 +195,10 @@ ThisBuild / compile / javacOptions ++= Seq(
Global / cancelable := true
Global / onChangedBuildSource := ReloadOnSourceChanges

ThisBuild / publishTo := sonatypePublishToBundle.value
ThisBuild / publishTo := sonatypePublishToBundle.value
sonatypeCredentialHost := "s01.oss.sonatype.org"
ThisBuild / scmInfo := Some(
ScmInfo(url("https://github.com/joernio/flatgraph"), "scm:git@github.com:joernio/flatgraph.git")
)
ThisBuild / homepage := Some(url("https://github.com/joernio/flatgraph/"))
ThisBuild / scmInfo := Some(ScmInfo(url("https://github.com/joernio/flatgraph"), "scm:git@github.com:joernio/flatgraph.git"))
ThisBuild / homepage := Some(url("https://github.com/joernio/flatgraph/"))

ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
ThisBuild / developers := List(
Expand Down

0 comments on commit 882b562

Please sign in to comment.