Skip to content

Commit 7ac6caf

Browse files
Improves build.
1 parent 5332dfe commit 7ac6caf

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.sbtopts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-J-Xmx2G
2+
-J-Xms2G
3+
-J-Xss6M
4+
-J-enableassertions

project/BuildSettings.scala

+8-11
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import sbtrelease.ReleaseStateTransformations._
2121

2222
object BuildSettings {
2323

24-
def releaseSettings: Seq[Setting[_]] = {
24+
lazy val releaseSettings: Seq[Setting[_]] = {
2525
Seq(
2626
releaseCrossBuild := false,
2727
releaseProcess := Seq[ReleaseStep](
@@ -40,7 +40,7 @@ object BuildSettings {
4040
)
4141
}
4242

43-
private def commonSettings: Seq[Setting[_]] = {
43+
private lazy val commonSettings: Seq[Setting[_]] = {
4444
Seq(
4545
homepage := Some(url("https://christian-schlichtherle.github.com/fun-io/")),
4646
licenses := Seq("Apache License, Version 2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")),
@@ -87,21 +87,18 @@ object BuildSettings {
8787
)
8888
}
8989

90-
def aggregateSettings: Seq[Setting[_]] = {
90+
lazy val aggregateSettings: Seq[Setting[_]] = {
9191
commonSettings ++ Seq(
9292
crossPaths := false,
9393
publishArtifact := false
9494
)
9595
}
9696

97-
def artifactSettings: Seq[Setting[_]] = {
98-
commonSettings ++ inConfig(Test)(Seq(
99-
fork := true, // triggers `javaOptions`
100-
javaOptions += "-ea"
101-
))
97+
lazy val artifactSettings: Seq[Setting[_]] = {
98+
commonSettings
10299
}
103100

104-
def librarySettings: Seq[Setting[_]] = {
101+
lazy val librarySettings: Seq[Setting[_]] = {
105102
artifactSettings ++ Seq(
106103
// Support testing Java projects with ScalaTest et al:
107104
compileOrder := CompileOrder.JavaThenScala,
@@ -111,14 +108,14 @@ object BuildSettings {
111108
)
112109
}
113110

114-
def javaLibrarySettings: Seq[Setting[_]] = {
111+
lazy val javaLibrarySettings: Seq[Setting[_]] = {
115112
librarySettings ++ Seq(
116113
autoScalaLibrary := false,
117114
crossPaths := false
118115
)
119116
}
120117

121-
def scalaLibrarySettings: Seq[Setting[_]] = {
118+
lazy val scalaLibrarySettings: Seq[Setting[_]] = {
122119
librarySettings ++ Seq(
123120
crossScalaVersions := Seq(ScalaVersion_2_10, ScalaVersion_2_11, ScalaVersion_2_12, ScalaVersion_2_13)
124121
)

project/plugins.sbt

-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
1716
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.11")

0 commit comments

Comments
 (0)