diff options
author | David Gregory <DavidGregory084@users.noreply.github.com> | 2018-10-31 20:44:53 +0000 |
---|---|---|
committer | Tobias Roeser <le.petit.fou@web.de> | 2018-10-31 21:44:52 +0100 |
commit | 7b4ced648ecd9b79b3a16d67552f0bb69f4dd543 (patch) | |
tree | 2067f545668e03605fb1704ab8286cccb152f6cf /main/core/src | |
parent | 099fdb8defb7d2c8316da94d749c0c23088e0dc9 (diff) | |
download | mill-7b4ced648ecd9b79b3a16d67552f0bb69f4dd543.tar.gz mill-7b4ced648ecd9b79b3a16d67552f0bb69f4dd543.tar.bz2 mill-7b4ced648ecd9b79b3a16d67552f0bb69f4dd543.zip |
Add tut contrib module (#464)
* Add tut contrib module
* Add TutModule tests and documentation
* Use Path instead of PathRef for tut target directory
* Use the correct scala version in TutModule
* Ensure resolving tut doesn't bring in extra scala-library jars
* Ensure MILL_VERSION system property is set in tut tests
* Fork to run tut to fix classpath problems, add test with library usage
* Follow convention w.r.t. publishVersion in testArgs
* Add Scaladoc to TutModule
* Don't supply a default version of Tut
* Update docs to account for mandatory tutVersion setting
* Inline tutArgs, otherwise Tut does not recompile when sources change
Diffstat (limited to 'main/core/src')
-rw-r--r-- | main/core/src/mill/util/JsonFormatters.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/core/src/mill/util/JsonFormatters.scala b/main/core/src/mill/util/JsonFormatters.scala index f92941f7..2728d94d 100644 --- a/main/core/src/mill/util/JsonFormatters.scala +++ b/main/core/src/mill/util/JsonFormatters.scala @@ -3,6 +3,7 @@ package mill.util import ammonite.ops.{Bytes, Path} import upickle.Js import upickle.default.{ReadWriter => RW} +import scala.util.matching.Regex object JsonFormatters extends JsonFormatters trait JsonFormatters { implicit val pathReadWrite: RW[ammonite.ops.Path] = upickle.default.readwriter[String] @@ -11,6 +12,12 @@ trait JsonFormatters { Path(_) ) + implicit val regexReadWrite: RW[Regex] = upickle.default.readwriter[String] + .bimap[Regex]( + _.pattern.toString, + _.r + ) + implicit val bytesReadWrite: RW[Bytes] = upickle.default.readwriter[String] .bimap( o => javax.xml.bind.DatatypeConverter.printBase64Binary(o.array), |