1
1
Global / onChangedBuildSource := ReloadOnSourceChanges
2
2
3
3
// For performance testing, ensure each test run one-by-one
4
- Global / concurrentRestrictions := Seq (
5
- Tags .limit(Tags .Test , 1 )
6
- )
4
+ Global / concurrentRestrictions := Seq (Tags .limit(Tags .Test , 1 ))
7
5
8
6
val AIRFRAME_VERSION = " 2025.1.14"
9
7
@@ -15,37 +13,65 @@ ThisBuild / dynverSeparator := "-"
15
13
// Publishing metadata
16
14
ThisBuild / homepage := Some (url(" https://msgpack.org/" ))
17
15
ThisBuild / licenses := Seq (" Apache-2.0" -> url(" http://www.apache.org/licenses/LICENSE-2.0.txt" ))
18
- ThisBuild / scmInfo := Some (
19
- ScmInfo (
20
- url(" https://github.com/msgpack/msgpack-java" ),
21
- " scm:[email protected] :msgpack/msgpack-java.git"
16
+ ThisBuild / scmInfo :=
17
+ Some (
18
+ ScmInfo (
19
+ url(" https://github.com/msgpack/msgpack-java" ),
20
+ " scm:[email protected] :msgpack/msgpack-java.git"
21
+ )
22
22
)
23
- )
24
- ThisBuild / developers := List (
25
- Developer (id
= " frsyuki" , name
= " Sadayuki Furuhashi" , email
= " [email protected] " , url
= url(
" https://github.com/frsyuki" )),
26
- Developer (id
= " muga" , name
= " Muga Nishizawa" , email
= " [email protected] " , url
= url(
" https://github.com/muga" )),
27
- Developer (id
= " oza" , name
= " Tsuyoshi Ozawa" , email
= " [email protected] " , url
= url(
" https://github.com/oza" )),
28
- Developer (id
= " komamitsu" , name
= " Mitsunori Komatsu" , email
= " [email protected] " , url
= url(
" https://github.com/komamitsu" )),
29
- Developer (id
= " xerial" , name
= " Taro L. Saito" , email
= " [email protected] " , url
= url(
" https://github.com/xerial" ))
30
- )
31
23
24
+ ThisBuild / developers :=
25
+ List (
26
+ Developer (
27
+ id = " frsyuki" ,
28
+ name = " Sadayuki Furuhashi" ,
29
+
30
+ url = url(" https://github.com/frsyuki" )
31
+ ),
32
+ Developer (
33
+ id = " muga" ,
34
+ name = " Muga Nishizawa" ,
35
+
36
+ url = url(" https://github.com/muga" )
37
+ ),
38
+ Developer (
39
+ id = " oza" ,
40
+ name = " Tsuyoshi Ozawa" ,
41
+
42
+ url = url(" https://github.com/oza" )
43
+ ),
44
+ Developer (
45
+ id = " komamitsu" ,
46
+ name = " Mitsunori Komatsu" ,
47
+
48
+ url = url(" https://github.com/komamitsu" )
49
+ ),
50
+ Developer (
51
+ id = " xerial" ,
52
+ name = " Taro L. Saito" ,
53
+
54
+ url = url(" https://github.com/xerial" )
55
+ )
56
+ )
32
57
33
- val buildSettings = Seq [Setting [_ ]](
34
- organization := " org.msgpack" ,
35
- organizationName := " MessagePack" ,
58
+ val buildSettings = Seq [Setting [? ]](
59
+ organization := " org.msgpack" ,
60
+ organizationName := " MessagePack" ,
36
61
organizationHomepage := Some (url(" http://msgpack.org/" )),
37
- description := " MessagePack for Java" ,
38
- scalaVersion := " 3.7.1" ,
39
- Test / logBuffered := false ,
62
+ description := " MessagePack for Java" ,
63
+ scalaVersion := " 3.7.1" ,
64
+ Test / logBuffered := false ,
40
65
// msgpack-java should be a pure-java library, so remove Scala specific configurations
41
- autoScalaLibrary := false ,
42
- crossPaths := false ,
66
+ autoScalaLibrary := false ,
67
+ crossPaths := false ,
43
68
publishMavenStyle := true ,
44
69
// JVM options for building
45
70
scalacOptions ++= Seq (" -encoding" , " UTF-8" , " -deprecation" , " -unchecked" , " -feature" ),
46
71
Test / javaOptions ++= Seq (" -ea" ),
47
72
javacOptions ++= Seq (" -source" , " 1.8" , " -target" , " 1.8" ),
48
- Compile / compile / javacOptions ++= Seq (" -encoding" , " UTF-8" , " -Xlint:unchecked" , " -Xlint:deprecation" ),
73
+ Compile / compile / javacOptions ++=
74
+ Seq (" -encoding" , " UTF-8" , " -Xlint:unchecked" , " -Xlint:deprecation" ),
49
75
// Use lenient validation mode when generating Javadoc (for Java8)
50
76
doc / javacOptions := {
51
77
val opts = Seq (" -source" , " 1.8" )
@@ -58,17 +84,21 @@ val buildSettings = Seq[Setting[_]](
58
84
// Add sonatype repository settings
59
85
publishTo := {
60
86
val centralSnapshots = " https://central.sonatype.com/repository/maven-snapshots/"
61
- if (isSnapshot.value) Some (" central-snapshots" at centralSnapshots)
62
- else localStaging.value
87
+ if (isSnapshot.value)
88
+ Some (" central-snapshots" at centralSnapshots)
89
+ else
90
+ localStaging.value
63
91
},
64
92
// Style check config: (sbt-jchekcstyle)
65
93
jcheckStyleConfig := " facebook" ,
66
94
// Run jcheckstyle both for main and test codes
67
- Compile / compile := ((Compile / compile) dependsOn (Compile / jcheckStyle)).value,
68
- Test / compile := ((Test / compile) dependsOn (Test / jcheckStyle)).value
95
+ Compile / compile :=
96
+ ((Compile / compile) dependsOn (Compile / jcheckStyle)).value,
97
+ Test / compile :=
98
+ ((Test / compile) dependsOn (Test / jcheckStyle)).value
69
99
)
70
100
71
- val junitJupiter = " org.junit.jupiter" % " junit-jupiter" % " 5.11.4" % " test"
101
+ val junitJupiter = " org.junit.jupiter" % " junit-jupiter" % " 5.11.4" % " test"
72
102
val junitVintage = " org.junit.vintage" % " junit-vintage-engine" % " 5.11.4" % " test"
73
103
74
104
// Project settings
@@ -77,67 +107,67 @@ lazy val root = Project(id = "msgpack-java", base = file("."))
77
107
buildSettings,
78
108
// Do not publish the root project
79
109
publishArtifact := false ,
80
- publish := {},
81
- publishLocal := {}
110
+ publish := {},
111
+ publishLocal := {}
82
112
)
83
113
.aggregate(msgpackCore, msgpackJackson)
84
114
85
115
lazy val msgpackCore = Project (id = " msgpack-core" , base = file(" msgpack-core" ))
86
116
.enablePlugins(SbtOsgi )
87
117
.settings(
88
118
buildSettings,
89
- description := " Core library of the MessagePack for Java" ,
119
+ description := " Core library of the MessagePack for Java" ,
90
120
OsgiKeys .bundleSymbolicName := " org.msgpack.msgpack-core" ,
91
- OsgiKeys .exportPackage := Seq (
92
- // TODO enumerate used packages automatically
93
- " org.msgpack.core" ,
94
- " org.msgpack.core.annotations" ,
95
- " org.msgpack.core.buffer" ,
96
- " org.msgpack.value" ,
97
- " org.msgpack.value.impl"
98
- ),
121
+ OsgiKeys .exportPackage :=
122
+ Seq (
123
+ // TODO enumerate used packages automatically
124
+ " org.msgpack.core" ,
125
+ " org.msgpack.core.annotations" ,
126
+ " org.msgpack.core.buffer" ,
127
+ " org.msgpack.value" ,
128
+ " org.msgpack.value.impl"
129
+ ),
99
130
testFrameworks += new TestFramework (" wvlet.airspec.Framework" ),
100
- Test / javaOptions ++= Seq (
101
- // --add-opens is not available in JDK8
102
- " -XX:+IgnoreUnrecognizedVMOptions" ,
103
- " --add-opens=java.base/java.nio=ALL-UNNAMED" ,
104
- " --add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
105
- ),
131
+ Test / javaOptions ++=
132
+ Seq (
133
+ // --add-opens is not available in JDK8
134
+ " -XX:+IgnoreUnrecognizedVMOptions" ,
135
+ " --add-opens=java.base/java.nio=ALL-UNNAMED" ,
136
+ " --add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
137
+ ),
106
138
Test / fork := true ,
107
- libraryDependencies ++= Seq (
108
- // msgpack-core should have no external dependencies
109
- junitJupiter,
110
- junitVintage,
111
- " org.wvlet.airframe" %% " airframe-json" % AIRFRAME_VERSION % " test" ,
112
- " org.wvlet.airframe" %% " airspec" % AIRFRAME_VERSION % " test" ,
113
- // Add property testing support with forAll methods
114
- " org.scalacheck" %% " scalacheck" % " 1.18.1" % " test" ,
115
- // For performance comparison with msgpack v6
116
- " org.msgpack" % " msgpack" % " 0.6.12" % " test" ,
117
- // For integration test with Akka
118
- " com.typesafe.akka" %% " akka-actor" % " 2.6.20" % " test" ,
119
- " org.scala-lang.modules" %% " scala-collection-compat" % " 2.13.0" % " test"
120
- )
139
+ libraryDependencies ++=
140
+ Seq (
141
+ // msgpack-core should have no external dependencies
142
+ junitJupiter,
143
+ junitVintage,
144
+ " org.wvlet.airframe" %% " airframe-json" % AIRFRAME_VERSION % " test" ,
145
+ " org.wvlet.airframe" %% " airspec" % AIRFRAME_VERSION % " test" ,
146
+ // Add property testing support with forAll methods
147
+ " org.scalacheck" %% " scalacheck" % " 1.18.1" % " test" ,
148
+ // For performance comparison with msgpack v6
149
+ " org.msgpack" % " msgpack" % " 0.6.12" % " test" ,
150
+ // For integration test with Akka
151
+ " com.typesafe.akka" %% " akka-actor" % " 2.6.20" % " test" ,
152
+ " org.scala-lang.modules" %% " scala-collection-compat" % " 2.13.0" % " test"
153
+ )
121
154
)
122
155
123
- lazy val msgpackJackson =
124
- Project (id = " msgpack-jackson" , base = file(" msgpack-jackson" ))
125
- .enablePlugins(SbtOsgi )
126
- .settings(
127
- buildSettings,
128
- name := " jackson-dataformat-msgpack" ,
129
- description := " Jackson extension that adds support for MessagePack" ,
130
- OsgiKeys .bundleSymbolicName := " org.msgpack.msgpack-jackson" ,
131
- OsgiKeys .exportPackage := Seq (
132
- " org.msgpack.jackson" ,
133
- " org.msgpack.jackson.dataformat"
134
- ),
135
- libraryDependencies ++= Seq (
136
- " com.fasterxml.jackson.core" % " jackson-databind" % " 2.18.4" ,
156
+ lazy val msgpackJackson = Project (id = " msgpack-jackson" , base = file(" msgpack-jackson" ))
157
+ .enablePlugins(SbtOsgi )
158
+ .settings(
159
+ buildSettings,
160
+ name := " jackson-dataformat-msgpack" ,
161
+ description := " Jackson extension that adds support for MessagePack" ,
162
+ OsgiKeys .bundleSymbolicName := " org.msgpack.msgpack-jackson" ,
163
+ OsgiKeys .exportPackage := Seq (" org.msgpack.jackson" , " org.msgpack.jackson.dataformat" ),
164
+ libraryDependencies ++=
165
+ Seq (
166
+ " com.fasterxml.jackson.core" % " jackson-databind" % " 2.19.2" ,
137
167
junitJupiter,
138
168
junitVintage,
139
169
" org.apache.commons" % " commons-math3" % " 3.6.1" % " test"
140
170
),
141
- testOptions += Tests .Argument (TestFrameworks .JUnit , " -v" )
142
- )
143
- .dependsOn(msgpackCore)
171
+ testOptions += Tests .Argument (TestFrameworks .JUnit , " -v" )
172
+ )
173
+ .dependsOn(msgpackCore)
0 commit comments