-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
90 lines (73 loc) · 2.89 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
scalaVersion := "2.13.12"
name := "P2M2Tools"
organizationName := "p2m2"
organization := "com.github.p2m2"
organizationHomepage := Some(url("https://www6.inrae.fr/p2m2"))
licenses := Seq("MIT License" -> url("http://www.opensource.org/licenses/mit-license.php"))
homepage := Some(url("https://github.com/p2m2/p2m2tools"))
description := "Development of it and bioinformatics tools for the activities of the P2M2 platform."
scmInfo := Some(
ScmInfo(
url("https://github.com/p2m2/p2m2tools"),
"scm:[email protected]:p2m2/p2m2tools.git"
)
)
versionScheme := Some("early-semver")
val static_version = "0.2.3c"
val version_build = scala.util.Properties.envOrElse("PROG_VERSION", static_version )
version := version_build
libraryDependencies ++= Seq(
"com.lihaoyi" %% "utest" % "0.8.2" % Test,
"org.apache.logging.log4j" % "log4j-to-slf4j" % "2.22.1" % Test,
"org.slf4j" % "slf4j-simple" % "2.0.11" % Test,
"org.apache.poi" % "poi-ooxml" % "5.2.5",
"com.github.scopt" %% "scopt" % "4.1.0",
"com.lihaoyi" %% "upickle" % "3.1.4",
"org.scala-lang.modules" %% "scala-xml" % "2.2.0" % Provided,
)
// Coverage
coverageMinimumStmtTotal := 98
coverageMinimumBranchTotal := 94
coverageMinimumStmtPerPackage := 95
coverageMinimumBranchPerPackage := 74
coverageMinimumStmtPerFile := 69
coverageMinimumBranchPerFile := 49
coverageFailOnMinimum := true
coverageHighlighting := true
// Publication
developers := List(
Developer("ofilangi", "Olivier Filangi", "[email protected]",url("https://github.com/ofilangi"))
)
credentials += {
val realm = scala.util.Properties.envOrElse("REALM_CREDENTIAL", "" )
val host = scala.util.Properties.envOrElse("HOST_CREDENTIAL", "" )
val login = scala.util.Properties.envOrElse("LOGIN_CREDENTIAL", "" )
val pass = scala.util.Properties.envOrElse("PASSWORD_CREDENTIAL", "" )
val file_credential = Path.userHome / ".sbt" / ".credentials"
if (reflect.io.File(file_credential).exists) {
Credentials(file_credential)
} else {
Credentials(realm,host,login,pass)
}
}
publishTo := {
if (isSnapshot.value)
Some("Sonatype Snapshots Nexus" at "https://oss.sonatype.org/content/repositories/snapshots")
else
Some("Sonatype Snapshots Nexus" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
}
publishConfiguration := publishConfiguration.value.withOverwrite(true)
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true)
pomIncludeRepository := { _ => false }
publishMavenStyle := true
assembly / target := file("assembly")
assembly / assemblyJarName := s"p2m2-$static_version.jar"
assembly / logLevel := Level.Info
assembly / assemblyMergeStrategy := {
case PathList("META-INF", xs @ _*) => MergeStrategy.last
case x =>
val oldStrategy = (ThisBuild / assemblyMergeStrategy).value
oldStrategy(x)
}
testFrameworks += new TestFramework("utest.runner.Framework")
Global / onChangedBuildSource := ReloadOnSourceChanges