spb-codec-tag_2.13

Mill plugin to derive a version from (last) git tag and edit state

License

License

GroupId

GroupId

io.github.chikei
ArtifactId

ArtifactId

spb-codec-tag_2.13
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

spb-codec-tag_2.13
Mill plugin to derive a version from (last) git tag and edit state
Project URL

Project URL

https://github.com/chikei/spb-codec
Source Code Management

Source Code Management

https://github.com/chikei/spb-codec

Download spb-codec-tag_2.13

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.chikei/spb-codec-tag_2.13/ -->
<dependency>
    <groupId>io.github.chikei</groupId>
    <artifactId>spb-codec-tag_2.13</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.chikei/spb-codec-tag_2.13/
implementation 'io.github.chikei:spb-codec-tag_2.13:0.1.0'
// https://jarcasting.com/artifacts/io.github.chikei/spb-codec-tag_2.13/
implementation ("io.github.chikei:spb-codec-tag_2.13:0.1.0")
'io.github.chikei:spb-codec-tag_2.13:jar:0.1.0'
<dependency org="io.github.chikei" name="spb-codec-tag_2.13" rev="0.1.0">
  <artifact name="spb-codec-tag_2.13" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.chikei', module='spb-codec-tag_2.13', version='0.1.0')
)
libraryDependencies += "io.github.chikei" % "spb-codec-tag_2.13" % "0.1.0"
[io.github.chikei/spb-codec-tag_2.13 "0.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

spb codec

build Maven Central

spb codec is a Protobuf 3 codec library for Scala.

spb codec is based on now archived protoless project and modified for my requirement.

QuickStart

spb codec is only built for scala 2.13 now.

libraryDependencies ++= Seq(
  "io.github.chikei" %% "spb-codec-magnolia" % "0.1.0",
  "io.protoless" %% "protoless-generic" % "0.0.7"
)
import io.github.chikei.spbcodec.magnolia.decoding.auto._
import io.github.chikei.spbcodec.magnolia.encoding.auto._

case class Person(firstname: String, lastname: String, age: Option[Int], locations: Seq[String])

val p = Person("John", "Doe", Some(28), Seq("Paris", "London", "New York"))
val byte = Encoder[Person].encodeAsBytes(p) // or p.asProtobufBytes
val decoded = Decoder[Person].decode(bytes)

Why?

ScalaPB is a decent scala library for protobuf, but it requires proto definition files to work with. For my case, what I need is something that can automatcally derive most case from scala case class model and I don't really care long term stability of binary format.

Contributing

The protoless project welcomes contributions from anybody wishing to participate. All code or documentation that is provided must be licensed with the same license that Protoless is licensed with (Apache 2.0, see LICENSE file).

Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about the code. Pull requests are also gladly accepted. You can also just enter in the gitter channel to talk with us.

License

Code is provided under the Apache 2.0 license available at http://opensource.org/licenses/Apache-2.0, as well as in the LICENSE file.

Versions

Version
0.1.0