Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Setup sbt-version-policy #484

Merged
merged 2 commits into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
with:
extraKey: pr-${GITHUB_HEAD_REF}
- name: Check/Compile/Test
run: sbt check
run: sbt versionPolicyCheck check
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would make more sense to put versionPolicyCheck into check

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that but this is supposed to be run on PRs only and we also run check during release where you want to run versionCheck. So I did it this way.

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
java-version: 11
- uses: coursier/cache-action@v5
- name: Check/Compile/Test
run: sbt check
run: sbt versionCheck check
- name: Release
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
Expand Down
1 change: 1 addition & 0 deletions .sbtopts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-J-Xmx4g
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ lazy val root = project
sentryPureConfig,
sslConfig
)
.disablePlugins(SbtVersionPolicyPlugin)
.settings(BuildSettings.common)
.settings(
name := "scala-server-toolkit",
Expand Down Expand Up @@ -132,6 +133,7 @@ lazy val doobieHikariPureConfig = project

lazy val example = project
.in(file("example"))
.disablePlugins(SbtVersionPolicyPlugin)
.dependsOn(
bundleZioHttp4sBlaze,
cassandraDatastaxDriver,
Expand Down
2 changes: 2 additions & 0 deletions project/BuildSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import sbt.Keys._
import sbt.nio.Keys._
import sbt.{Def, _}
import sbtunidoc.ScalaUnidocPlugin.autoImport._
import sbtversionpolicy.SbtVersionPolicyPlugin.autoImport._
import scalafix.sbt.ScalafixPlugin.autoImport._

object BuildSettings {
Expand All @@ -15,6 +16,7 @@ object BuildSettings {
Global / cancelable := true,
Global / excludeLintKeys += fork,
ThisBuild / versionScheme := Some("early-semver"),
ThisBuild / versionPolicyIntention := Compatibility.BinaryCompatible,
turbo := true,
organization := "com.avast",
organizationName := "Avast",
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.2")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3")
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0")
addSbtPlugin("io.chrisdavenport" % "sbt-mima-version-check" % "0.1.2")
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.0-RC5")