Skip to content

Commit 8571c0c

Browse files
committed
Refactor build & publish
1 parent 0b439a9 commit 8571c0c

File tree

2 files changed

+29
-43
lines changed

2 files changed

+29
-43
lines changed

build.sbt

+23-37
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,13 @@
11
name := "web-echo"
22
organization := "fr.janalyse"
3-
homepage := Some(url("https://github.com/dacr/web-echo"))
3+
description := "JSON data recorder"
44

55
licenses += "NON-AI-APACHE2" -> url(s"https://github.com/non-ai-licenses/non-ai-licenses/blob/main/NON-AI-APACHE2")
66

7-
scmInfo := Some(
8-
ScmInfo(
9-
url(s"https://github.com/dacr/counters.git"),
10-
s"[email protected]:dacr/counters.git"
11-
)
12-
)
13-
14-
developers := List(
15-
Developer(
16-
id = "dacr",
17-
name = "David Crosson",
18-
email = "[email protected]",
19-
url = url("https://github.com/dacr")
20-
)
21-
)
22-
23-
Compile / mainClass := Some("webecho.Main")
24-
packageBin / mainClass := Some("webecho.Main")
25-
26-
versionScheme := Some("semver-spec")
27-
287
scalaVersion := "2.13.15"
298

309
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8", "-feature")
3110

32-
Test / testOptions += {
33-
val rel = scalaVersion.value.split("[.]").take(2).mkString(".")
34-
Tests.Argument(
35-
"-oDF", // -oW to remove colors
36-
"-u",
37-
s"target/junitresults/scala-$rel/"
38-
)
39-
}
40-
4111
lazy val versions = new {
4212
// client side dependencies
4313
val swaggerui = "5.17.14"
@@ -88,12 +58,28 @@ libraryDependencies ++= Seq(
8858
"org.webjars" % "webjars-locator" % versions.webjarsLocator
8959
)
9060

91-
enablePlugins(JavaServerAppPackaging)
61+
Compile / mainClass := Some("webecho.Main")
62+
packageBin / mainClass := Some("webecho.Main")
9263

64+
Test / testOptions += {
65+
val rel = scalaVersion.value.split("[.]").take(2).mkString(".")
66+
Tests.Argument(
67+
"-oDF", // -oW to remove colors
68+
"-u",
69+
s"target/junitresults/scala-$rel/"
70+
)
71+
}
72+
73+
enablePlugins(JavaServerAppPackaging)
9374
enablePlugins(SbtTwirl)
9475

95-
// TODO - to remove when twirl will be available for scala3
96-
//libraryDependencies := libraryDependencies.value.map {
97-
// case module if module.name == "twirl-api" => module.cross(CrossVersion.for3Use2_13)
98-
// case module => module
99-
//}
76+
homepage := Some(url("https://github.com/dacr/web-echo"))
77+
scmInfo := Some(ScmInfo(url(s"https://github.com/dacr/web-echo.git"), s"[email protected]:dacr/web-echo.git"))
78+
developers := List(
79+
Developer(
80+
id = "dacr",
81+
name = "David Crosson",
82+
email = "[email protected]",
83+
url = url("https://github.com/dacr")
84+
)
85+
)

publish.sbt

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
pomIncludeRepository := { _ => false }
2-
publishMavenStyle := true
1+
pomIncludeRepository := { _ => false }
2+
publishMavenStyle := true
33
Test / publishArtifact := false
4-
releaseCrossBuild := true
5-
versionScheme := Some("semver-spec")
4+
releaseCrossBuild := true
5+
versionScheme := Some("semver-spec")
66

77
publishTo := {
88
// For accounts created after Feb 2021:
@@ -14,8 +14,8 @@ publishTo := {
1414

1515
releasePublishArtifactsAction := PgpKeys.publishSigned.value
1616

17-
releaseTagComment := s"Releasing ${(ThisBuild / version).value}"
18-
releaseCommitMessage := s"Setting version to ${(ThisBuild / version).value}"
17+
releaseTagComment := s"Releasing ${(ThisBuild / version).value}"
18+
releaseCommitMessage := s"Setting version to ${(ThisBuild / version).value}"
1919
releaseNextCommitMessage := s"[ci skip] Setting version to ${(ThisBuild / version).value}"
2020

2121
import ReleaseTransformations.*

0 commit comments

Comments
 (0)