Skip to content

Commit

Permalink
upgraded sbt to current version to work with sbt and bloop build serv…
Browse files Browse the repository at this point in the history
…er. (#679)

Co-authored-by: Carson Wilkins <carson.wilkins@databricks.com>
  • Loading branch information
2 people authored and sudharshanraja-db committed Apr 11, 2023
1 parent 998efda commit 3862a5b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 28 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ project/target/
\.terraform
terraform.tfstate*
\.terraform.lock.hcl
*/.bloop
*/.bsp
*/.idea
*/.metals
*/.vscode
.bloop
.bsp
.metals
.idea
31 changes: 6 additions & 25 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ version := "0.7.2.0"
scalaVersion := "2.12.12"
scalacOptions ++= Seq("-Xmax-classfile-name", "78")

fork in Test := true
envVars in Test := Map("OVERWATCH_ENV" -> " ","OVERWATCH_TOKEN" -> " ","OVERWATCH" -> " ")
Test / fork := true
Test / envVars := Map("OVERWATCH_ENV" -> " ","OVERWATCH_TOKEN" -> " ","OVERWATCH" -> " ")

val sparkVersion = "3.1.2"
libraryDependencies += "org.apache.spark" %% "spark-core" % sparkVersion % Provided
Expand All @@ -29,17 +29,16 @@ libraryDependencies += "com.github.mrpowers" %% "spark-fast-tests" % "0.23.0" %
libraryDependencies += "org.mockito" % "mockito-core" % "3.5.15" % Test
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.2" % Test

run in Compile := Defaults.runTask(fullClasspath in Compile, mainClass in (Compile, run), runner in (Compile, run)).evaluated
runMain in Compile := Defaults.runMainTask(fullClasspath in Compile, runner in(Compile, run)).evaluated
Compile / run := Defaults.runTask(Compile / fullClasspath ,Compile/ run / mainClass, Compile / run / runner).evaluated
Compile / runMain := Defaults.runMainTask(Compile / fullClasspath,Compile / run / runner ).evaluated

// groupId, SCM, license information
homepage := Some(url("https://github.com/databrickslabs/overwatch"))
scmInfo := Some(ScmInfo(url("https://github.com/databrickslabs/overwatch"), "git@github.com:databrickslabs/overwatch.git"))
developers := List(Developer("geeksheikh", "Daniel Tomes", "daniel@databricks.com", url("https://github.com/GeekSheikh")))
licenses += ("Databricks", url("https://github.com/databrickslabs/overwatch/blob/develop/LICENSE"))
publishMavenStyle := true

parallelExecution in Test := false //TO avoid object collision happening in PipelineFunctionsTest
Test / parallelExecution := false //TO avoid object collision happening in PipelineFunctionsTest

publishTo := Some(
if (version.value.endsWith("SNAPSHOT"))
Expand All @@ -48,26 +47,8 @@ publishTo := Some(
Opts.resolver.sonatypeStaging
)

// enforce execution of tests during packaging - uncomment next line when we fix dependencies
// Keys.`package` := (Compile / Keys.`package` dependsOn Test / test).value

//coverageEnabled := true
//coverageMinimum := 80
//coverageFailOnMinimum := true

//test in assembly := {}

assemblyMergeStrategy in assembly := {
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
}
assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false)

// exclude scala-library dependency
// assemblyExcludedJars in assembly := {
// val cp = (fullClasspath in assembly).value
// cp filter { f =>
// f.data.getName.contains("eventhubs") ||
// f.data.getName.contains("msal4j")
// }
// }
assembly / assemblyOption := (assembly / assemblyOption).value.copy(includeScala = false)
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.8
sbt.version=1.8.1
3 changes: 1 addition & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "2.0.0-RC6-8")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.5")
addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.0.3")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")

0 comments on commit 3862a5b

Please sign in to comment.