1
+ val versionRegex = """ ^(.*)\.(.*)\.(.*)$""" .r
2
+ val scala2_13 = " 2.13.14"
3
+ val scala2_12 = " 2.12.20"
4
+ val sparkVersion = System .getProperty(" spark.version" , " 3.5.3" )
5
+ val noPublish = Seq (
6
+ (publish / skip) := true ,
7
+ publishArtifact := false
8
+ )
9
+
1
10
inThisBuild(
2
11
List (
3
12
organization := " com.github.mrpowers" ,
4
13
homepage := Some (url(" https://github.com/mrpowers-io/spark-fast-tests" )),
5
14
licenses := Seq (" MIT" -> url(" http://opensource.org/licenses/MIT" )),
6
15
developers ++= List (
7
16
Developer (" MrPowers" , " Matthew Powers" , " @MrPowers" , url(" https://github.com/MrPowers" ))
8
- )
17
+ ),
18
+ Compile / scalafmtOnCompile := true ,
19
+ Test / fork := true ,
20
+ crossScalaVersions := {
21
+ sparkVersion match {
22
+ case versionRegex(" 3" , m, _) if m.toInt >= 2 => Seq (scala2_12, scala2_13)
23
+ case versionRegex(" 3" , _, _) => Seq (scala2_12)
24
+ }
25
+ },
26
+ scalaVersion := crossScalaVersions.value.head
9
27
)
10
28
)
11
29
12
30
enablePlugins(GitVersioning )
13
- Compile / scalafmtOnCompile := true
14
-
15
- name := " spark-fast-tests"
16
-
17
- val versionRegex = """ ^(.*)\.(.*)\.(.*)$""" .r
18
-
19
- val scala2_13 = " 2.13.14"
20
- val scala2_12 = " 2.12.20"
21
-
22
- val sparkVersion = System .getProperty(" spark.version" , " 3.5.3" )
23
- crossScalaVersions := {
24
- sparkVersion match {
25
- case versionRegex(" 3" , m, _) if m.toInt >= 2 => Seq (scala2_12, scala2_13)
26
- case versionRegex(" 3" , _, _) => Seq (scala2_12)
27
- }
28
- }
29
-
30
- scalaVersion := crossScalaVersions.value.head
31
-
32
- Test / fork := true
33
31
34
32
lazy val commonSettings = Seq (
35
33
javaOptions ++= {
@@ -46,7 +44,8 @@ lazy val commonSettings = Seq(
46
44
lazy val core = (project in file(" core" ))
47
45
.settings(
48
46
commonSettings,
49
- name := " core" ,
47
+ moduleName := " spark-fast-tests" ,
48
+ name := moduleName.value,
50
49
Compile / packageSrc / publishArtifact := true ,
51
50
Compile / packageDoc / publishArtifact := true
52
51
)
@@ -58,9 +57,9 @@ lazy val benchmarks = (project in file("benchmarks"))
58
57
libraryDependencies ++= Seq (
59
58
" org.openjdk.jmh" % " jmh-generator-annprocess" % " 1.37" // required for jmh IDEA plugin. Make sure this version matches sbt-jmh version!
60
59
),
61
- name := " benchmarks" ,
62
- publish / skip := true
60
+ name := " benchmarks"
63
61
)
62
+ .settings(noPublish)
64
63
.enablePlugins(JmhPlugin )
65
64
66
65
lazy val docs = (project in file(" docs" ))
@@ -111,14 +110,22 @@ lazy val docs = (project in file("docs"))
111
110
import laika .format .Markdown
112
111
Seq (Markdown .GitHubFlavor , SyntaxHighlighting )
113
112
},
114
- publish / skip := true ,
115
113
Laika / sourceDirectories := Seq ((ThisBuild / baseDirectory).value / " docs" )
116
114
)
115
+ .settings(noPublish)
116
+
117
+ lazy val root = (project in file(" ." ))
118
+ .settings(
119
+ name := " spark-fast-tests-root" ,
120
+ commonSettings,
121
+ noPublish
122
+ )
123
+ .aggregate(core, benchmarks, docs)
117
124
118
125
scmInfo
:= Some (
ScmInfo (url(
" https://github.com/mrpowers-io/spark-fast-tests" ),
" [email protected] :MrPowers/spark-fast-tests.git" ))
119
126
120
127
updateOptions := updateOptions.value.withLatestSnapshots(false )
121
128
122
129
import xerial .sbt .Sonatype .sonatypeCentralHost
123
130
124
- ThisBuild / sonatypeCredentialHost := sonatypeCentralHost
131
+ ThisBuild / sonatypeCredentialHost := sonatypeCentralHost
0 commit comments