Skip to content

Commit 997d7f9

Browse files
committed
build: Put all settings to BuildSettings
build: Cleanup
1 parent 0b527bf commit 997d7f9

File tree

7 files changed

+27
-23
lines changed

7 files changed

+27
-23
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
with:
1515
java-version: 1.8
1616
- name: Check/Compile/Test
17-
run: sbt checkAll
17+
run: sbt check
1818
update_release_draft:
1919
runs-on: ubuntu-latest
2020
steps:

.github/workflows/pull.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
with:
1212
java-version: 1.8
1313
- name: Check/Compile/Test
14-
run: sbt checkAll
14+
run: sbt check

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020
- name: Install GPG
2121
uses: olafurpg/setup-gpg@v2
2222
- name: Check/Compile/Test
23-
run: sbt checkAll
23+
run: sbt check
2424
- name: Release
2525
env:
2626
PGP_SECRET: ${{ secrets.PGP_SECRET }}
2727
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
2828
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
2929
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
30-
run: sbt ci-release
30+
run: sbt mimaReportBinaryIssues ci-release
3131
- name: Publish Microsite
3232
env:
3333
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ version = "2.5.2"
22

33
maxColumn = 140
44
assumeStandardLibraryStripMargin = true
5-
onTestFailure = "To fix this, run 'sbt fixAll' from the project root directory."
5+
onTestFailure = "To fix this, run 'sbt fix' from the project root directory."

build.sbt

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
ThisBuild / organization := "com.avast"
2-
ThisBuild / organizationName := "Avast"
3-
ThisBuild / organizationHomepage := Some(url("https://avast.com"))
4-
ThisBuild / homepage := Some(url("https://github.com/avast/scala-server-toolkit"))
5-
ThisBuild / description := "Functional programming toolkit for building server applications in Scala."
6-
ThisBuild / licenses := Seq("MIT" -> url("https://raw.githubusercontent.com/avast/scala-server-toolkit/master/LICENSE"))
7-
ThisBuild / developers := List(Developer("jakubjanecek", "Jakub Janecek", "[email protected]", url("https://www.avast.com")))
8-
9-
ThisBuild / scalaVersion := "2.13.1"
10-
ThisBuild / turbo := true
11-
Global / onChangedBuildSource := ReloadOnSourceChanges
12-
Global / cancelable := true
13-
141
lazy val root = project
152
.in(file("."))
163
.aggregate(
@@ -49,6 +36,7 @@ lazy val root = project
4936
sentryPureConfig,
5037
sslConfig
5138
)
39+
.settings(BuildSettings.common)
5240
.settings(
5341
name := "scala-server-toolkit",
5442
publish / skip := true
@@ -448,5 +436,8 @@ lazy val sslConfig = project
448436
)
449437
)
450438

451-
addCommandAlias("checkAll", "; scalafmtSbtCheck; scalafmtCheckAll; compile:scalafix --check; test:scalafix --check; +test")
452-
addCommandAlias("fixAll", "; compile:scalafix; test:scalafix; scalafmtSbt; scalafmtAll")
439+
addCommandAlias(
440+
"check",
441+
"; scalafmtSbtCheck; scalafmtCheckAll; compile:scalafix --check; test:scalafix --check; +test"
442+
)
443+
addCommandAlias("fix", "; compile:scalafix; test:scalafix; scalafmtSbt; scalafmtAll")

project/BuildSettings.scala

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
11
import com.typesafe.sbt.site.SitePlugin.autoImport._
2+
import com.typesafe.tools.mima.plugin.MimaKeys._
23
import mdoc.MdocPlugin.autoImport._
34
import microsites.CdnDirectives
45
import microsites.MicrositesPlugin.autoImport._
56
import sbt.Keys._
7+
import sbt.nio.Keys._
68
import sbt.{Def, _}
79
import sbtunidoc.ScalaUnidocPlugin.autoImport._
810
import scalafix.sbt.ScalafixPlugin.autoImport._
911

1012
object BuildSettings {
1113

1214
lazy val common: Seq[Def.Setting[_]] = Seq(
13-
crossScalaVersions := List(scalaVersion.value, "2.12.10"),
15+
Global / onChangedBuildSource := ReloadOnSourceChanges,
16+
Global / cancelable := true,
17+
turbo := true,
18+
organization := "com.avast",
19+
organizationName := "Avast",
20+
organizationHomepage := Some(url("https://avast.com")),
21+
homepage := Some(url("https://github.com/avast/scala-server-toolkit")),
22+
description := "Functional programming toolkit for building server applications in Scala.",
23+
licenses := Seq("MIT" -> url("https://raw.githubusercontent.com/avast/scala-server-toolkit/master/LICENSE")),
24+
developers := List(Developer("jakubjanecek", "Jakub Janecek", "[email protected]", url("https://www.avast.com"))),
25+
scalaVersion := "2.13.2",
26+
crossScalaVersions := List(scalaVersion.value, "2.12.11"),
1427
fork := true,
28+
mimaPreviousArtifacts ~= { _.filter(_.revision == "0.1.34") }, // this is just temporary until we have release version 1.x
1529
libraryDependencies ++= Seq(
1630
compilerPlugin(Dependencies.kindProjector),
1731
compilerPlugin(Dependencies.silencer),
@@ -22,7 +36,7 @@ object BuildSettings {
2236
Dependencies.scalaTest % Test
2337
),
2438
semanticdbEnabled := true,
25-
semanticdbVersion := scalafixSemanticdb.revision,
39+
semanticdbVersion := "4.3.10", // scalafixSemanticdb.revision,
2640
ThisBuild / scalafixDependencies ++= Seq(
2741
Dependencies.scalafixScaluzzi,
2842
Dependencies.scalafixSortImports

project/plugins.sbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ addSbtPlugin("com.47deg" % "sbt-microsites" % "1.2.1")
66
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3")
77
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0")
88
addSbtPlugin("io.chrisdavenport" % "sbt-mima-version-check" % "0.1.2")
9-
addSbtPlugin("ch.epfl.scala" % "sbt-missinglink" % "0.3.1")

0 commit comments

Comments
 (0)