-
Notifications
You must be signed in to change notification settings - Fork 43
/
build.sbt
97 lines (75 loc) · 2.64 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
import org.typelevel.sbt.tpolecat.DevMode
import sbt.Keys._
import sbt._
import org.typelevel.scalacoptions._
normalizedName := "play-redis"
name := "Redis Cache for Play"
description := "Redis cache plugin for the Play framework 2"
organization := "com.github.karelcemus"
crossScalaVersions := Seq("2.13.14", "3.3.3")
scalaVersion := crossScalaVersions.value.head
playVersion := "3.0.2"
libraryDependencies ++= Seq(
// play framework cache API
"org.playframework" %% "play-cache" % playVersion.value % Provided,
// redis connector
"io.lettuce" % "lettuce-core" % "6.3.2.RELEASE",
// test framework with mockito extension
"org.scalatest" %% "scalatest" % "3.2.18" % Test,
"org.scalamock" %% "scalamock" % "6.0.0" % Test,
// test module for play framework
"org.playframework" %% "play-test" % playVersion.value % Test,
// to run integration tests
"com.dimafeng" %% "testcontainers-scala-core" % "0.41.3" % Test,
)
resolvers ++= Seq(
"Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/",
)
javacOptions ++= Seq("-Xlint:unchecked", "-encoding", "UTF-8")
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked")
scalacOptions ++= {
if (scalaVersion.value.startsWith("2.")) Seq("-Ywarn-unused") else Seq.empty
}
ThisBuild / version := "4.0.2"
enablePlugins(CustomReleasePlugin)
// exclude from tests coverage
coverageExcludedFiles := ".*exceptions.*"
Test / fork := true
Test / test := (Test / testOnly).toTask(" * -- -l \"org.scalatest.Ignore\"").value
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oF")
semanticdbEnabled := true
semanticdbVersion := scalafixSemanticdb.revision
wartremoverWarnings ++= Warts.allBut(
Wart.Any,
Wart.AnyVal,
Wart.AsInstanceOf,
Wart.AutoUnboxing,
Wart.DefaultArguments,
Wart.FinalVal,
Wart.GlobalExecutionContext,
Wart.ImplicitConversion,
Wart.ImplicitParameter,
Wart.IterableOps,
Wart.NonUnitStatements,
Wart.Nothing,
Wart.Null,
Wart.OptionPartial,
Wart.Overloading,
Wart.PlatformDefault,
Wart.StringPlusAny,
Wart.Throw,
Wart.ToString,
Wart.TryPartial,
Wart.Var,
)
tpolecatDevModeOptions ~= { opts =>
opts.filterNot(Set(ScalacOptions.warnError))
}
Test / tpolecatExcludeOptions ++= Set(
ScalacOptions.warnValueDiscard,
ScalacOptions.warnNonUnitStatement,
)
ThisBuild / tpolecatCiModeEnvVar := "CI"
ThisBuild / tpolecatDefaultOptionsMode := DevMode
addCommandAlias("fix", "; scalafixAll; scalafmtAll; scalafmtSbt")
addCommandAlias("lint", "; scalafmtSbtCheck; scalafmtCheckAll; scalafixAll --check")