1
1
import com .typesafe .sbt .SbtScalariform ._
2
- import com .typesafe .tools .mima .plugin .MimaPlugin ._
3
- import interplay .ScalaVersions
4
2
import scalariform .formatter .preferences ._
5
3
6
4
ThisBuild / dynverVTagPrefix := false
7
5
8
- lazy val commonSettings = mimaDefaultSettings ++ Seq (
9
- // scalaVersion needs to be kept in sync with travis-ci
10
- scalaVersion := ScalaVersions .scala213,
11
- crossScalaVersions := Seq (ScalaVersions .scala212, ScalaVersions .scala213),
6
+ lazy val commonSettings = Seq (
7
+ scalaVersion := Dependencies .Scala213 ,
8
+ crossScalaVersions := Dependencies .ScalaVersions ,
12
9
scalariformAutoformat := true ,
13
10
ScalariformKeys .preferences := ScalariformKeys .preferences.value
14
11
.setPreference(SpacesAroundMultiImports , true )
@@ -35,49 +32,44 @@ lazy val commonSettings = mimaDefaultSettings ++ Seq(
35
32
" -Xlint:unchecked" ,
36
33
" -Xlint:deprecation"
37
34
),
38
-
39
- mimaBinaryIssueFilters ++= Seq (
40
- )
41
35
)
42
36
43
- // needs to be kept in sync with travis-ci
44
- val PlayVersion = playVersion(sys.env.getOrElse(" PLAY_VERSION" , " 2.8.0" ))
45
-
46
- // Version used to check binary compatibility
47
- val mimaPreviousArtifactsVersion = " 7.0.1"
48
-
49
37
lazy val `play-mailer` = (project in file(" play-mailer" ))
50
- .enablePlugins(PlayLibrary )
38
+ .enablePlugins(Common )
51
39
.settings(commonSettings)
52
40
.settings(
53
41
libraryDependencies ++= Seq (
54
42
" javax.inject" % " javax.inject" % " 1" ,
55
43
" com.typesafe" % " config" % " 1.4.0" ,
56
44
" org.slf4j" % " slf4j-api" % " 1.7.30" ,
57
45
" org.apache.commons" % " commons-email" % " 1.5" ,
58
- " com.typesafe.play" %% " play" % PlayVersion % Test ,
59
- " com.typesafe.play" %% " play-specs2" % PlayVersion % Test
46
+ " com.typesafe.play" %% " play" % Dependencies . PlayVersion % Test ,
47
+ " com.typesafe.play" %% " play-specs2" % Dependencies . PlayVersion % Test
60
48
),
61
- mimaPreviousArtifacts := Set (" com.typesafe.play" %% " play-mailer" % mimaPreviousArtifactsVersion)
49
+ mimaPreviousArtifacts := Set (" com.typesafe.play" %% " play-mailer" % previousStableVersion.value
50
+ .getOrElse(throw new Error (" Unable to determine previous version" )))
62
51
)
63
52
64
53
lazy val `play-mailer-guice` = (project in file(" play-mailer-guice" ))
65
- .enablePlugins(PlayLibrary )
54
+ .enablePlugins(Common )
66
55
.settings(commonSettings)
67
56
.dependsOn(`play-mailer`)
68
57
.settings(
69
58
libraryDependencies ++= Seq (
70
59
" com.google.inject" % " guice" % " 4.2.2" ,
71
- " com.typesafe.play" %% " play" % PlayVersion % Test ,
72
- " com.typesafe.play" %% " play-specs2" % PlayVersion % Test
60
+ " com.typesafe.play" %% " play" % Dependencies . PlayVersion % Test ,
61
+ " com.typesafe.play" %% " play-specs2" % Dependencies . PlayVersion % Test
73
62
),
74
- mimaPreviousArtifacts := Set (" com.typesafe.play" %% " play-mailer-guice" % mimaPreviousArtifactsVersion)
63
+ mimaPreviousArtifacts := Set (" com.typesafe.play" %% " play-mailer-guice" % previousStableVersion.value
64
+ .getOrElse(throw new Error (" Unable to determine previous version" )))
75
65
)
76
66
77
67
lazy val `play-mailer-root` = (project in file(" ." ))
78
- .enablePlugins( PlayRootProject , PlayReleaseBase )
68
+ .disablePlugins( MimaPlugin )
79
69
.settings(commonSettings)
80
- .settings(mimaFailOnNoPrevious := false )
70
+ .settings(
71
+ crossScalaVersions := Nil ,
72
+ publish / skip := true
73
+ )
81
74
.aggregate(`play-mailer`, `play-mailer-guice`)
82
75
83
- playBuildRepoName in ThisBuild := " play-mailer"
0 commit comments