@@ -20,16 +20,16 @@ lazy val compilerOptions212 = Seq(
20
20
)
21
21
22
22
lazy val compilerOptions213 = Seq (
23
- " -Xlint:adapted-args" , // Warn if an argument list is modified to match the receiver.
24
- " -Xlint:inaccessible" , // Warn about inaccessible types in method signatures.
25
- " -Xlint:infer-any" , // Warn when a type argument is inferred to be Any.
26
- " -Xlint:nullary-unit" , // Warn when nullary methods return Unit.
27
- " -Xlint:unused" , // Enable -Ywarn-unused:imports,privates,locals,implicits.
28
- " -Wdead-code" , // Warn when dead code is identified.
29
- " -Wextra-implicit" , // Warn when more than one implicit parameter section is defined.
30
- " -Wnumeric-widen" , // Warn when numerics are widened.
31
- " -Wunused:patvars" , // Warn if a variable bound in a pattern is unused.
32
- " -Wvalue-discard" // Warn when non-Unit expression results are unused.
23
+ " -Xlint:adapted-args" , // Warn if an argument list is modified to match the receiver.
24
+ " -Xlint:inaccessible" , // Warn about inaccessible types in method signatures.
25
+ " -Xlint:infer-any" , // Warn when a type argument is inferred to be Any.
26
+ " -Xlint:nullary-unit" , // Warn when nullary methods return Unit.
27
+ " -Xlint:unused" , // Enable -Ywarn-unused:imports,privates,locals,implicits.
28
+ " -Wdead-code" , // Warn when dead code is identified.
29
+ " -Wextra-implicit" , // Warn when more than one implicit parameter section is defined.
30
+ " -Wnumeric-widen" , // Warn when numerics are widened.
31
+ " -Wunused:patvars" , // Warn if a variable bound in a pattern is unused.
32
+ " -Wvalue-discard" // Warn when non-Unit expression results are unused.
33
33
)
34
34
35
35
lazy val compilerOptionsAll = Seq (
@@ -69,7 +69,7 @@ def compilerOptionsVersion(scalaVersion: String) =
69
69
70
70
lazy val scalaVersion212 : String = " 2.12.13"
71
71
lazy val scalaVersion213 : String = " 2.13.6"
72
- lazy val supportedScalaVersions = List (scalaVersion212, scalaVersion213)
72
+ lazy val supportedScalaVersions = List (scalaVersion212, scalaVersion213)
73
73
74
74
ThisBuild / scalaVersion := scalaVersion212
75
75
@@ -176,10 +176,10 @@ lazy val http4s021 =
176
176
.settings(
177
177
name := " scalapact-http4s-0-21" ,
178
178
libraryDependencies ++= Seq (
179
- " org.http4s" %% " http4s-blaze-server" % " 0.21.18" exclude(" org.scala-lang.modules" , " scala-xml" ),
180
- " org.http4s" %% " http4s-blaze-client" % " 0.21.18" exclude(" org.scala-lang.modules" , " scala-xml" ),
181
- " org.http4s" %% " http4s-dsl" % " 0.21.18" ,
182
- " com.github.tomakehurst" % " wiremock" % " 2.25.1" % " test"
179
+ " org.http4s" %% " http4s-blaze-server" % " 0.21.18" exclude (" org.scala-lang.modules" , " scala-xml" ),
180
+ " org.http4s" %% " http4s-blaze-client" % " 0.21.18" exclude (" org.scala-lang.modules" , " scala-xml" ),
181
+ " org.http4s" %% " http4s-dsl" % " 0.21.18" ,
182
+ " com.github.tomakehurst" % " wiremock" % " 2.25.1" % " test"
183
183
)
184
184
)
185
185
.dependsOn(shared)
@@ -191,10 +191,10 @@ lazy val http4s023 =
191
191
.settings(
192
192
name := " scalapact-http4s-0-23" ,
193
193
libraryDependencies ++= Seq (
194
- " org.http4s" %% " http4s-blaze-server" % " 0.23.0-RC1 " exclude(" org.scala-lang.modules" , " scala-xml" ),
195
- " org.http4s" %% " http4s-blaze-client" % " 0.23.0-RC1 " exclude(" org.scala-lang.modules" , " scala-xml" ),
196
- " org.http4s" %% " http4s-dsl" % " 0.23.0-RC1 " ,
197
- " com.github.tomakehurst" % " wiremock" % " 2.25.1" % " test"
194
+ " org.http4s" %% " http4s-blaze-server" % " 0.23.1 " exclude (" org.scala-lang.modules" , " scala-xml" ),
195
+ " org.http4s" %% " http4s-blaze-client" % " 0.23.1 " exclude (" org.scala-lang.modules" , " scala-xml" ),
196
+ " org.http4s" %% " http4s-dsl" % " 0.23.1 " ,
197
+ " com.github.tomakehurst" % " wiremock" % " 2.25.1" % " test"
198
198
)
199
199
)
200
200
.dependsOn(shared)
@@ -236,6 +236,21 @@ lazy val circe13 =
236
236
.dependsOn(shared)
237
237
.dependsOn(testShared % " test->compile" )
238
238
239
+ lazy val circe14 =
240
+ (project in file(" scalapact-circe-0-14" ))
241
+ .settings(commonSettings : _* )
242
+ .settings(publishSettings : _* )
243
+ .settings(
244
+ name := " scalapact-circe-0-14" ,
245
+ libraryDependencies ++= Seq (
246
+ " io.circe" %% " circe-core" ,
247
+ " io.circe" %% " circe-generic" ,
248
+ " io.circe" %% " circe-parser"
249
+ ).map(_ % " 0.14.1" )
250
+ )
251
+ .dependsOn(shared)
252
+ .dependsOn(testShared % " test->compile" )
253
+
239
254
lazy val pluginShared =
240
255
(project in file(" sbt-scalapact-shared" ))
241
256
.settings(commonSettings : _* )
@@ -252,11 +267,11 @@ lazy val plugin =
252
267
.settings(publishSettings : _* )
253
268
.settings(
254
269
name := " sbt-scalapact" ,
255
- sbtPlugin := true ,
270
+ sbtPlugin := true
256
271
)
257
272
.dependsOn(pluginShared)
258
- .dependsOn(circe13 )
259
- .dependsOn(http4s021 )
273
+ .dependsOn(circe14 )
274
+ .dependsOn(http4s023 )
260
275
.settings(scala212OnlySettings)
261
276
262
277
lazy val pluginNoDeps =
@@ -265,11 +280,11 @@ lazy val pluginNoDeps =
265
280
.settings(publishSettings : _* )
266
281
.settings(
267
282
name := " sbt-scalapact-nodeps" ,
268
- sbtPlugin := true ,
283
+ sbtPlugin := true
269
284
)
270
285
.dependsOn(pluginShared)
271
- .dependsOn(circe13 % " provided" )
272
- .dependsOn(http4s021 % " provided" )
286
+ .dependsOn(circe14 % " provided" )
287
+ .dependsOn(http4s023 % " provided" )
273
288
.settings(scala212OnlySettings)
274
289
275
290
lazy val framework =
@@ -295,8 +310,8 @@ lazy val frameworkWithDeps =
295
310
}
296
311
)
297
312
.dependsOn(framework)
298
- .dependsOn(circe13 )
299
- .dependsOn(http4s021 )
313
+ .dependsOn(circe14 )
314
+ .dependsOn(http4s023 )
300
315
301
316
lazy val standalone =
302
317
(project in file(" scalapact-standalone-stubber" ))
@@ -330,18 +345,18 @@ lazy val testsWithDeps =
330
345
.settings(commonSettings : _* )
331
346
.settings(
332
347
libraryDependencies ++= Seq (
333
- " org.scalaj" %% " scalaj-http" % " 2.4.2" % " test" ,
334
- " org.json4s" %% " json4s-native" % " 3.6.11" % " test" ,
335
- " com.github.tomakehurst" % " wiremock" % " 1.56" % " test" ,
336
- " fr.hmil" %% " roshttp" % " 2.1.0" % " test" ,
337
- " io.argonaut" %% " argonaut" % " 6.2.5"
348
+ " org.scalaj" %% " scalaj-http" % " 2.4.2" % " test" ,
349
+ " org.json4s" %% " json4s-native" % " 3.6.11" % " test" ,
350
+ " com.github.tomakehurst" % " wiremock" % " 1.56" % " test" ,
351
+ " fr.hmil" %% " roshttp" % " 2.1.0" % " test" ,
352
+ " io.argonaut" %% " argonaut" % " 6.2.5"
338
353
),
339
354
skip in publish := true
340
355
)
341
356
.settings(scala212OnlySettings)
342
357
.dependsOn(framework)
343
- .dependsOn(circe13 )
344
- .dependsOn(http4s021 )
358
+ .dependsOn(circe14 )
359
+ .dependsOn(http4s023 )
345
360
346
361
lazy val docs =
347
362
(project in file(" scalapact-docs" ))
@@ -367,7 +382,7 @@ lazy val scalaPactProject =
367
382
)
368
383
.aggregate(shared, core, pluginShared, plugin, pluginNoDeps, framework, testShared)
369
384
.aggregate(http4s021, http4s023)
370
- .aggregate(argonaut62, circe13)
385
+ .aggregate(argonaut62, circe13, circe14 )
371
386
.aggregate(standalone, frameworkWithDeps)
372
387
.aggregate(docs)
373
388
.aggregate(pactSpec, testsWithDeps)
@@ -381,34 +396,41 @@ val readmeFileKey = settingKey[File]("The location of the readme")
381
396
readmeFileKey := baseDirectory.value / " README.md"
382
397
383
398
lazy val updateVersionsInReadme : ReleaseStep = { st : State =>
384
- st.get(ReleaseKeys .versions).flatMap { case (newVersion, _) =>
385
- val readmeFile = st.extract.get(readmeFileKey).getCanonicalFile
386
- val readmeLines = IO .readLines(readmeFile)
387
- val versionPrefix = " ## Latest version is "
388
- val currentVersion = readmeLines.collectFirst { case s if s.startsWith(versionPrefix) => s.replace(versionPrefix, " " ).dropWhile(_.isWhitespace)}
389
- currentVersion.map { cv =>
390
- IO .writeLines(readmeFile, readmeLines.map(_.replaceAll(cv, newVersion)))
399
+ st.get(ReleaseKeys .versions)
400
+ .flatMap { case (newVersion, _) =>
401
+ val readmeFile = st.extract.get(readmeFileKey).getCanonicalFile
402
+ val readmeLines = IO .readLines(readmeFile)
403
+ val versionPrefix = " ## Latest version is "
404
+ val currentVersion = readmeLines.collectFirst {
405
+ case s if s.startsWith(versionPrefix) => s.replace(versionPrefix, " " ).dropWhile(_.isWhitespace)
406
+ }
407
+ currentVersion.map { cv =>
408
+ IO .writeLines(readmeFile, readmeLines.map(_.replaceAll(cv, newVersion)))
409
+ }
391
410
}
392
- } .getOrElse(())
411
+ .getOrElse(())
393
412
394
413
st
395
414
}
396
415
397
416
lazy val commitReadMeVersionBump : ReleaseStep = { st : State =>
398
- def vcs (st : State ): Vcs = {
399
- st.extract.get(releaseVcs).getOrElse(sys.error(" Aborting release. Working directory is not a repository of a recognized VCS." ))
400
- }
417
+ def vcs (st : State ): Vcs =
418
+ st.extract
419
+ .get(releaseVcs)
420
+ .getOrElse(sys.error(" Aborting release. Working directory is not a repository of a recognized VCS." ))
401
421
val commitMessage : TaskKey [String ] = releaseNextCommitMessage
402
422
val log = new ProcessLogger {
403
423
override def err (s : => String ): Unit = st.log.info(s)
404
424
override def out (s : => String ): Unit = st.log.info(s)
405
- override def buffer [T ](f : => T ): T = st.log.buffer(f)
425
+ override def buffer [T ](f : => T ): T = st.log.buffer(f)
406
426
}
407
427
val readmeFile = st.extract.get(readmeFileKey).getCanonicalFile
408
- val base = vcs(st).baseDir.getCanonicalFile
409
- val sign = st.extract.get(releaseVcsSign)
410
- val signOff = st.extract.get(releaseVcsSignOff)
411
- val relativePathToReadme = IO .relativize(base, readmeFile).getOrElse(" Readme file [%s] is outside of this VCS repository with base directory [%s]!" format(readmeFile, base))
428
+ val base = vcs(st).baseDir.getCanonicalFile
429
+ val sign = st.extract.get(releaseVcsSign)
430
+ val signOff = st.extract.get(releaseVcsSignOff)
431
+ val relativePathToReadme = IO
432
+ .relativize(base, readmeFile)
433
+ .getOrElse(" Readme file [%s] is outside of this VCS repository with base directory [%s]!" format (readmeFile, base))
412
434
413
435
vcs(st).add(relativePathToReadme) !! log
414
436
0 commit comments