Skip to content

Commit

Permalink
feat: upgrade to play 2.8.1 & ebean 11.45.1 (#192)
Browse files Browse the repository at this point in the history
* feat: upgrade to play 2.8.0

- included jaxb as a transitive dependency, since ebean requires it and if not included then this plugin will not work out of the box with Java 11

* feat: java 11 travis tests must pass

- previously java 1 tests where allowed to fail

* rfac: upgrade to play 2.8.1
  • Loading branch information
lapidus79 authored Feb 11, 2020
1 parent cce7247 commit 34806ea
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 20 deletions.
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ env:

matrix:
fast_finish: true
allow_failures:
# Java 11 is not fully supported, but this allows for problem discovery
- env: SCRIPT="sbt +jacoco" TRAVIS_JDK=11
- env: SCRIPT="sbt +publishLocal +plugin/test +plugin/scripted" TRAVIS_JDK=11
- env: SCRIPT="cd docs && sbt test" TRAVIS_JDK=11
- env: SCRIPT="cd docs && sbt validateDocs evaluateSbtFiles" TRAVIS_JDK=11

before_install:
- curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The Play Ebean plugin supports several different versions of Play and Ebean.

| Plugin version | Play version | Ebean version |
|----------------|--------------|---------------|
| 6.0.0 | 2.8.1 | 11.45.1 |
| 5.0.2 | 2.7.0 | 11.39.x |
| 5.0.1    | 2.7.0   | 11.32.x       |
| 5.0.0    | 2.7.0   | 11.22.x       |
Expand Down
11 changes: 7 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ import interplay.ScalaVersions.scala212

val scala213 = "2.13.0"
val Versions = new {
val play: String = playVersion(sys.props.getOrElse("play.version", "2.7.3"))
val play: String = playVersion(sys.props.getOrElse("play.version", "2.8.1"))
val playEnhancer = "1.2.2"
val ebean = "11.33.2"
val ebeanAgent = "11.27.1"
val typesafeConfig = "1.3.3"
val ebean = "11.45.1"
val ebeanAgent = "11.45.1"
val typesafeConfig = "1.3.4"
}

lazy val root = project
.in(file("."))
.enablePlugins(PlayRootProject, CrossPerProjectPlugin)
.aggregate(core, plugin)
.settings(
sources in (Compile, doc) := Seq(),
name := "play-ebean-root",
releaseCrossBuild := false
)
Expand All @@ -23,6 +24,7 @@ lazy val core = project
.in(file("play-ebean"))
.enablePlugins(Playdoc, PlayLibrary, JacocoPlugin)
.settings(
sources in (Compile, doc) := Seq(),
name := "play-ebean",
crossScalaVersions := Seq(scala212, scala213),
libraryDependencies ++= playEbeanDeps,
Expand All @@ -39,6 +41,7 @@ lazy val plugin = project
.in(file("sbt-play-ebean"))
.enablePlugins(PlaySbtPlugin)
.settings(
sources in (Compile, doc) := Seq(),
name := "sbt-play-ebean",
organization := "com.typesafe.sbt",
libraryDependencies ++= sbtPlayEbeanDeps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public MyComponents(ApplicationLoader.Context context) {

@Override
public play.routing.Router router() {
return routingDsl().GET("/").routeTo(() ->
return routingDsl().GET("/").routingTo((req) ->
Results.ok("Hello")
).build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ object PlayEbean extends AutoPlugin {
playEbeanDebugLevel := -1,
playEbeanAgentArgs := Map("debug" -> playEbeanDebugLevel.value.toString),
playEbeanVersion := readResourceProperty("play-ebean.version.properties", "play-ebean.version"),
libraryDependencies += "com.typesafe.play" %% "play-ebean" % playEbeanVersion.value
libraryDependencies += "com.typesafe.play" %% "play-ebean" % playEbeanVersion.value,
libraryDependencies += "org.glassfish.jaxb" % "jaxb-runtime" % "2.3.2"
)

def ebeanEnhance: Def.Initialize[Task[Compiler.CompileResult]] = Def.task {
Expand Down
10 changes: 3 additions & 7 deletions sbt-play-ebean/src/main/scala-sbt-1.0/sbt/PlayEbean.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,16 @@ package play.ebean.sbt

import io.ebean.enhance.Transformer
import io.ebean.enhance.ant.OfflineFileTransform

import sbt._
import sbt.Keys._

import sbt.Keys.{libraryDependencies, _}
import xsbti.compile.CompileResult
import xsbti.compile.analysis.Stamp

import sbt.internal.inc.Hash
import sbt.internal.inc.Stamper
import sbt.internal.inc.LastModified

import java.net.URLClassLoader

import scala.util.control.NonFatal

import com.typesafe.play.sbt.enhancer.PlayEnhancer

object PlayEbean extends AutoPlugin {
Expand Down Expand Up @@ -50,7 +45,8 @@ object PlayEbean extends AutoPlugin {
playEbeanDebugLevel := -1,
playEbeanAgentArgs := Map("debug" -> playEbeanDebugLevel.value.toString),
playEbeanVersion := readResourceProperty("play-ebean.version.properties", "play-ebean.version"),
libraryDependencies += "com.typesafe.play" %% "play-ebean" % playEbeanVersion.value
libraryDependencies += "com.typesafe.play" %% "play-ebean" % playEbeanVersion.value,
libraryDependencies += "org.glassfish.jaxb" % "jaxb-runtime" % "2.3.2"
)

// This is replacement of old Stamp `Exists` representation
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "5.0.3-SNAPSHOT"
version in ThisBuild := "6.0.0"

0 comments on commit 34806ea

Please sign in to comment.