-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
137 lines (127 loc) · 4.99 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
val artifactId = "poolq"
inThisBuild(
List(
scalaVersion := "3.3.3",
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
versionScheme := Some("early-semver")
)
)
lazy val versions = new {
val betterFiles = "3.9.2"
val catsEffect3 = "3.5.4"
val cats = "2.10.0"
val commonsIo = "2.16.1"
val commonsText = "1.12.0"
val commonsMath3 = "3.6.1"
val fastutil = "8.5.13"
val fs2 = "3.10.2"
val log4s = "1.10.0"
val logback = "1.2.13"
val munit = "0.7.29"
val munitCatsEffect3 = "1.0.7"
val samTools = "3.0.5"
val scalaCheck = "1.18.0"
val scalaCsv = "1.3.10"
val scalaTest = "3.2.18"
val scalaTestPlusScalaCheck = "3.2.18.0"
val scopt = "4.1.0"
val slf4j = "1.7.36"
}
lazy val libraries = new {
val betterFiles = "com.github.pathikrit" %% "better-files" % versions.betterFiles
val cats = "org.typelevel" %% "cats-core" % versions.cats
val catsEffect3 = "org.typelevel" %% "cats-effect" % versions.catsEffect3
val commonsIo = "commons-io" % "commons-io" % versions.commonsIo
val commonsMath3 = "org.apache.commons" % "commons-math3" % versions.commonsMath3
val fastutil = "it.unimi.dsi" % "fastutil" % versions.fastutil
val fs2Core = "co.fs2" %% "fs2-core" % versions.fs2
val fs2Io = "co.fs2" %% "fs2-io" % versions.fs2
val log4s = "org.log4s" %% "log4s" % versions.log4s
val logbackCore = "ch.qos.logback" % "logback-core" % versions.logback
val logbackClassic = "ch.qos.logback" % "logback-classic" % versions.logback
val samtools = "com.github.samtools" % "htsjdk" % versions.samTools
val scalaCsv = "com.github.tototoshi" %% "scala-csv" % versions.scalaCsv
val scopt = "com.github.scopt" %% "scopt" % versions.scopt
val slf4j = "org.slf4j" % "slf4j-api" % versions.slf4j
// test dependency definitions
val commonsText = "org.apache.commons" % "commons-text" % versions.commonsText
val munit = "org.scalameta" %% "munit" % versions.munit
val munitScalacheck = "org.scalameta" %% "munit-scalacheck" % versions.munit
val munitCatsEffect3 = "org.typelevel" %% "munit-cats-effect-3" % versions.munitCatsEffect3
val scalaTest = "org.scalatest" %% "scalatest" % versions.scalaTest
val scalaCheck = "org.scalacheck" %% "scalacheck" % versions.scalaCheck
val scalaTestPlusScalaCheck = "org.scalatestplus" %% "scalacheck-1-17" % versions.scalaTestPlusScalaCheck
}
lazy val dependencies =
List(
libraries.cats,
libraries.commonsIo,
libraries.commonsMath3,
libraries.fastutil,
libraries.log4s,
libraries.logbackCore % Runtime,
libraries.logbackClassic % Runtime,
libraries.samtools,
libraries.scalaCsv,
libraries.scopt,
libraries.slf4j,
libraries.betterFiles % Test,
libraries.catsEffect3 % Test,
libraries.commonsText % Test,
libraries.fs2Core % Test,
libraries.fs2Io % Test,
libraries.munit % Test,
libraries.munitCatsEffect3 % Test,
libraries.munitScalacheck % Test,
libraries.scalaCheck % Test,
libraries.scalaTest % Test,
libraries.scalaTestPlusScalaCheck % Test
)
lazy val headerLicenseText =
"""|Copyright (c) 2024 The Broad Institute, Inc. All rights reserved.
|
|SPDX-License-Identifier: BSD-3-Clause
|""".stripMargin
lazy val headerSettings = List(
organizationName := "The Broad Institute",
headerLicense := Some(HeaderLicense.Custom(headerLicenseText)),
headerEmptyLine := false
)
lazy val assemblySettings = List(
assembly / assemblyJarName := "../bin/poolq3.jar",
assembly / assemblyMergeStrategy := {
case "logback.xml" => MergeStrategy.first
case "logback-test.xml" => MergeStrategy.discard
case PathList("module-info.class") => MergeStrategy.discard
case PathList("META-INF", "versions", xs @ _, "module-info.class") => MergeStrategy.discard
case "module-info.class" => MergeStrategy.first
case x =>
val old = (assembly / assemblyMergeStrategy).value
old(x)
},
assembly / mainClass := Some("org.broadinstitute.gpp.poolq3.PoolQ")
)
lazy val publishSettings = List(
// Publish to GitHub Packages:
githubOwner := "broadinstitute",
githubRepository := artifactId,
githubTokenSource := TokenSource.Environment("GITHUB_TOKEN") || TokenSource.GitConfig("github.token")
)
lazy val poolq = project
.in(file("."))
.enablePlugins(BuildInfoPlugin)
.settings(
name := "poolq3",
organization := "org.broadinstitute.gpp",
libraryDependencies := dependencies,
buildInfoKeys := Seq[BuildInfoKey](name, version),
buildInfoPackage := "org.broadinstitute.gpp.poolq3",
testFrameworks += new TestFramework("munit.Framework"),
// Tests pass in parallel, but SLF4J logging behaves weirdly. Disable this flag to examine test
// log output; leave this enabled for very fast test execution.
Test / parallelExecution := true
)
.settings(headerSettings: _*)
.settings(assemblySettings: _*)
.settings(publishSettings: _*)