Skip to content

Commit

Permalink
Play release/1.8 (#383)
Browse files Browse the repository at this point in the history
* * 1.8.0-SNAPSHOT
* Fixup readme
* Fixup Scala 3 macro + scalafmt

Signed-off-by: lloydmeta <lloydmeta@gmail.com>

* 1.8.0 release

Signed-off-by: lloydmeta <lloydmeta@gmail.com>

* 1.8.1-SNAPSHOT begins for play integrations

Signed-off-by: lloydmeta <lloydmeta@gmail.com>

---------

Signed-off-by: lloydmeta <lloydmeta@gmail.com>
  • Loading branch information
lloydmeta committed Nov 12, 2023
1 parent 47dd3e1 commit 8bd7a22
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -343,7 +343,7 @@ libraryDependencies ++= Seq(
As expected, usage is exactly the same as normal Scala.

## Play Integration
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.beachape/enumeratum-play_2.12/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.beachape/enumeratum-play_2.12)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.beachape/enumeratum-play_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.beachape/enumeratum-play_2.13)

The `enumeratum-play` project is published separately and gives you access to various tools
to help you avoid boilerplate in your Play project.
Expand All @@ -358,7 +358,7 @@ libraryDependencies ++= Seq(
```

#### Dependencies and compatibility notes
- As of version 1.6.1, `enumeratum-play` for Scala 2.12 requires Play >= 2.8
- As of version 1.8, `enumeratum-play` requires Scala 2.13+ and Play >= 3

### Usage

Expand Down Expand Up @@ -486,7 +486,7 @@ object GreetingForm {
```

## Play JSON
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.beachape/enumeratum-play-json_2.12/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.beachape/enumeratum-play-json_2.12)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.beachape/enumeratum-play-json_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.beachape/enumeratum-play-json_2.13)

The `enumeratum-play-json` project is published separately and gives you access to Play's auto-generated boilerplate
for JSON serialization in your Enum's.
Expand Down
6 changes: 2 additions & 4 deletions build.sbt
Expand Up @@ -270,7 +270,7 @@ lazy val enumeratumPlayJson = crossProject(JSPlatform, JVMPlatform)
.jsSettings(jsTestSettings)
.settings(
name := "enumeratum-play-json",
version := Versions.Core.head,
version := "1.8.1-SNAPSHOT",
crossScalaVersions := scalaVersionsAll,
libraryDependencies ++= Seq(
"org.playframework" %%% "play-json" % "3.0.0",
Expand Down Expand Up @@ -299,7 +299,7 @@ lazy val enumeratumPlay = Project(id = "enumeratum-play", base = file("enumeratu
.settings(commonWithPublishSettings)
.settings(testSettings)
.settings(
version := Versions.Core.head,
version := "1.8.1-SNAPSHOT",
// Play do not support 2.12 (default from common settings)
scalaVersion := scala_2_13Version,
crossScalaVersions := Seq(scala_2_13Version, scala_3Version),
Expand Down Expand Up @@ -766,10 +766,8 @@ lazy val publishSettings = Seq(
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pgpPassphrase := sys.env.get("PGP_PASSPHRASE").map(_.toCharArray),
publishMavenStyle := true,
Test / publishArtifact := false,
PgpKeys.pgpPassphrase := sys.env.get("PGP_PASSPHRASE").map(_.toCharArray),
pomIncludeRepository := { _ =>
false
}
Expand Down
Expand Up @@ -14,13 +14,15 @@ private[enumeratum] trait IntEnumCompanion {

private[enumeratum] trait IntEnumCompat[A <: IntEnumEntry] { _enum: IntEnum[A] =>

// format: off
/** Returns a Seq of [[A]] objects that the macro was able to find.
*
* You will want to use this in some way to implement your [[values]] method. In fact, if you
* aren't using this method...why are you even bothering with this lib?
*/
protected inline def findValues: IndexedSeq[A] =
${ ValueEnumMacros.findIntValueEntriesImpl[A] }
// format: on
}

private[enumeratum] trait LongEnumCompanion {
Expand All @@ -34,12 +36,14 @@ private[enumeratum] trait LongEnumCompanion {

private[enumeratum] trait LongEnumCompat[A <: LongEnumEntry] { _enum: LongEnum[A] =>

// format: off
/** Returns a Seq of [[A]] objects that the macro was able to find.
*
* You will want to use this in some way to implement your [[values]] method. In fact, if you
* aren't using this method...why are you even bothering with this lib?
*/
protected inline def findValues: IndexedSeq[A] = ${ ValueEnumMacros.findLongValueEntriesImpl[A] }
// format: on
}

private[enumeratum] trait ShortEnumCompanion {
Expand Down Expand Up @@ -76,6 +80,7 @@ private[enumeratum] trait StringEnumCompanion {

private[enumeratum] trait StringEnumCompat[A <: StringEnumEntry] { _enum: StringEnum[A] =>

// format: off
/** Returns a Seq of [[A]] objects that the macro was able to find.
*
* You will want to use this in some way to implement your [[values]] method. In fact, if you
Expand All @@ -84,6 +89,7 @@ private[enumeratum] trait StringEnumCompat[A <: StringEnumEntry] { _enum: String
protected inline def findValues: IndexedSeq[A] = ${
ValueEnumMacros.findStringValueEntriesImpl[A]
}
// format: on
}

private[enumeratum] trait ByteEnumCompanion {
Expand All @@ -97,6 +103,7 @@ private[enumeratum] trait ByteEnumCompanion {

private[enumeratum] trait ByteEnumCompat[A <: ByteEnumEntry] { _enum: ByteEnum[A] =>

// format: off
/** Returns a Seq of [[A]] objects that the macro was able to find.
*
* You will want to use this in some way to implement your [[values]] method. In fact, if you
Expand All @@ -105,6 +112,7 @@ private[enumeratum] trait ByteEnumCompat[A <: ByteEnumEntry] { _enum: ByteEnum[A
protected inline def findValues: IndexedSeq[A] = ${
ValueEnumMacros.findByteValueEntriesImpl[A]
}
// format: on
}

private[enumeratum] trait CharEnumCompanion {
Expand All @@ -118,6 +126,7 @@ private[enumeratum] trait CharEnumCompanion {

private[enumeratum] trait CharEnumCompat[A <: CharEnumEntry] { _enum: CharEnum[A] =>

// format: off
/** Returns a Seq of [[A]] objects that the macro was able to find.
*
* You will want to use this in some way to implement your [[values]] method. In fact, if you
Expand All @@ -126,4 +135,5 @@ private[enumeratum] trait CharEnumCompat[A <: CharEnumEntry] { _enum: CharEnum[A
protected inline def findValues: IndexedSeq[A] = ${
ValueEnumMacros.findCharValueEntriesImpl[A]
}
// format: on
}

0 comments on commit 8bd7a22

Please sign in to comment.