-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.sbt
105 lines (102 loc) · 3.86 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
98
99
100
101
102
103
104
105
import Dependencies._
import play.sbt.PlayImport
import sbt.Keys._
// scalaVersion := "2.13.11"
// the application
lazy val hat = project
.in(file("hat"))
.settings(dockerSettings)
.enablePlugins(PlayScala)
.enablePlugins(SbtWeb, SbtSassify, SbtGzip, SbtDigest)
.enablePlugins(BasicSettings)
.enablePlugins(SlickCodeGeneratorPlugin)
.disablePlugins(PlayLogback)
.settings(
//scalaVersion := "2.13.11",
libraryDependencies ++= Seq(
PlayImport.ehcache,
PlayImport.filters,
PlayImport.guice,
PlayImport.ws,
DsLib.Adjudicator,
DsLib.DexClient,
DsLib.PlayCommon,
DsLib.RedisCache,
DsLib.SilhouetteCryptoJca,
DsLib.SilhouettePasswordBcrypt,
DsLib.SilhouettePersistence,
DsLib.SlickPostgresDriver,
Lib.AwsV1Sdk,
Lib.AwsV2SdkLambda,
Lib.AwsV2SdkSts,
Lib.AwsV2SdkAuth,
Lib.BouncyCastle,
Lib.Ficus,
Lib.Guard,
Lib.Nbvcxz,
Lib.PlayJson,
Lib.PlayJsonJoda,
Lib.PlaySlick,
Lib.PlayTest,
Lib.PrometheusFilter,
Lib.ScalaGuice,
LocalThirdParty.CirceConfig,
LocalThirdParty.PrettyTime,
DsLib.IntegrationTestCommon % Test,
DsLib.SilhouetteTestkit % Test,
Lib.ScalaTestScalaCheck % Test,
LocalThirdParty.ScalaTestplusMockito % Test
),
Test / parallelExecution := false,
Test / fork := true,
Test / envVars := Map("AWS_DEFAULT_REGION" -> "eu-west-1", "AWS_REGION" -> "eu-west-1"),
IntegrationTest / fork := true,
IntegrationTest / envVars := Map("AWS_DEFAULT_REGION" -> "eu-west-1", "AWS_REGION" -> "eu-west-1"),
Assets / pipelineStages := Seq(digest),
Assets / sourceDirectory := baseDirectory.value / "app" / "org" / "hatdex" / "hat" / "phata" / "assets",
update / aggregate := false,
Global / cancelable := false, // Workaround sbt/bug#4822 Unable to Ctrl-C out of 'run' in a Play app
TwirlKeys.templateImports := Seq(),
play.sbt.routes.RoutesKeys.routesImport := Seq.empty,
routesGenerator := InjectedRoutesGenerator,
Global / concurrentRestrictions += Tags.limit(Tags.Test, 1),
coverageExcludedPackages := """.*\.controllers\..*Reverse.*;router.Routes.*;org.hatdex.hat.dal.Tables.*;org.hatdex.hat.phata.views.*;controllers.javascript\..*""",
// Do not publish docs and source in compiled package
Compile / doc / sources := Seq.empty,
Compile / packageDoc / publishArtifact := false,
Compile / packageSrc / publishArtifact := false
)
.settings(
gentables / codegenPackageName := "org.hatdex.hat.dal",
gentables / codegenBaseDir := (baseDirectory.value / "app").getCanonicalPath,
gentables / codegenClassName := "Tables",
gentables / codegenExcludedTables := Seq("databasechangelog", "databasechangeloglock"),
gentables / codegenDatabase := "devdb",
gentables / codegenConfig := "dev.conf",
gentables / codegenEvolutions := "devhatMigrations"
)
.settings(
// Omit Tables.scala for scalafix, since it is autogenerated
Compile / scalafix / unmanagedSources := (Compile / unmanagedSources).value
.filterNot(
_.getAbsolutePath.contains(
"dal/Tables.scala"
)
),
// Omit Tables.scala for scalafmt, since it is autogenerated
Compile / scalafmt / unmanagedSources := (Compile / unmanagedSources).value
.filterNot(
_.getAbsolutePath.contains(
"dal/Tables.scala"
)
)
)
// Enable the semantic DB for scalafix
inThisBuild(
List(
scalafixScalaBinaryVersion := "2.13",
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.6.0"
)
)