name := """niosx"""
organization := "link.milli"

//major.minor.patch
version := "0.5.0"


lazy val root = (project in file("."))
  .enablePlugins(
    PlayScala, DockerPlugin)
    .settings(
      name := "niosx"
    )

scalaVersion := "2.13.8"

fork := true

//Resolvers
resolvers ++= Seq(
  Resolver.sonatypeRepo("releases"),
  Resolver.jcenterRepo
  )



libraryDependencies += filters
libraryDependencies += guice
libraryDependencies += ws
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "4.0.3" % Test
libraryDependencies += "org.sangria-graphql" %% "sangria" % "2.0.0"
//libraryDependencies += "org.sangria-graphql" %% "sangria-circe" % "1.2.1"
libraryDependencies += "org.sangria-graphql" %% "sangria-play-json" % "2.0.1"
//libraryDependencies += "com.vitorsvieira" %% "scala-iso" % "0.1.2"
libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "1.2.0"
//libraryDependencies += "com.michaelpollmeier" %% "gremlin-scala" % "3.4.4.3"
//libraryDependencies += "org.apache.tinkerpop" % "neo4j-gremlin" % "3.4.3"
//libraryDependencies += "org.neo4j" % "neo4j-tinkerpop-api-impl" % "0.7-3.2.3"
libraryDependencies += "com.softwaremill.macwire" %% "macros" % "2.3.6" % "provided"
libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.3"

//Data ingestion
libraryDependencies ++= Seq(
  "com.github.tototoshi" %% "scala-csv" % "1.3.7",
  "com.lucidchart" %% "xtract" % "2.3.0-alpha3")

//JanusGraph
val janusgraphVersion = "0.6.0"
libraryDependencies ++= Seq(
  "org.apache.tinkerpop" % "gremlin-driver" % "3.4.6",
  "org.janusgraph" % "janusgraph-inmemory" % janusgraphVersion,
  "org.janusgraph" % "janusgraph-driver" % janusgraphVersion,
  "org.janusgraph" % "janusgraph-core" % janusgraphVersion,
  "org.janusgraph" % "janusgraph-cql" % janusgraphVersion % Runtime,
  "org.janusgraph" % "janusgraph-es" % janusgraphVersion % Runtime
  )
//Silhouette //TODO: Upgrade to Slihouette7
//libraryDependencies ++= Seq(
//  "com.mohiva" %% "play-silhouette" % "6.1.0",
//  "com.mohiva" %% "play-silhouette-password-bcrypt" % "6.1.0",
//  "com.mohiva" %% "play-silhouette-crypto-jca" % "6.1.0",
//  "com.mohiva" %% "play-silhouette-persistence" % "6.1.0",
//  "com.mohiva" %% "play-silhouette-testkit" % "6.1.0" % "test"
//)
//Security
libraryDependencies ++= Seq(
  "org.mindrot"  % "jbcrypt"   % "0.4")

//Docker related settings
dockerBaseImage := "adoptopenjdk:11-jre-hotspot"
dockerExposedVolumes := Seq("/opt/docker/data")
dockerExposedPorts ++= Seq(9000, 9001)
dockerUsername := Some("milliarchives")

javaOptions in Universal ++= Seq(
  // don't write any pid files. 
  //  Ref: https://github.com/sbt/sbt-native-packager/issues/1361
  "-Dpidfile.path=/dev/null",
  // reference a logback config file that has no file appenders
  "-Dlogger.resource=logback-prod.xml"
  )

