I have a Play Framework project with build.sbt.
My organization completely uses/supports gradle and not SBT.
I want to use Playframework (Gradle don’t support Play) to build a POC.
Now my idea is to use Gradle as a thin layer above SBT.
Some thing like Jenkins invokes Gradle and gradle invokes sbt which will build my application.
Can you help me to know if gradle supports to import build.sbt in build.gradle or any plugins/way to invoke build.sbt?
I got stuck with this since a long time and seeking a help.
Thanks Sterling.
Yes it can but till 2.4 version of Play.
I’m using the latest version of Play where there is no support from Gradle.
Did you try with Play latest version 2.6 with gradle?
Cool.
So you should be updating the doc (https://docs.gradle.org/current/userguide/play_plugin.html) with the latest configurations and play supported versions in 4.4.
Do we still say its in incubating state like “Support for building Play applications is currently incubating” in 4.4?
we are doing an application that uses play 2.6.2, scala 2.11, and Gradle 4.3.1.
In that while i am trying to build my application using “gradlew runPlayBinary”, I am getting
an exception says,
Failed to run Play
org.gradle.internal.UncheckedException: java.lang.NoSuchMethodException: play.core.server.DevServerStart$.mainDevHttpMode(play.core.BuildLink, play.core.BuildDocHandler, int, java.lang.String)
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:63)
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:40)
at org.gradle.scala.internal.reflect.ScalaMethod.getMethod(ScalaMethod.java:43)
at org.gradle.scala.internal.reflect.ScalaMethod.(ScalaMethod.java:32)
at org.gradle.scala.internal.reflect.ScalaMethod.(ScalaMethod.java:36)
at org.gradle.scala.internal.reflect.ScalaReflectionUtil.scalaMethod(ScalaReflectionUtil.java:21)
While surfing i found that in scala 2.11 the DevServerStart$.mainDevHttpMode method accpets 3 pamaeters.
Scal 2.10 alone accepts 4 parameters. I got stuck here. Please provide any solution to overcome this error.
Here is my build.gradle file
plugins {
id 'play’
id ‘java’
}
dependencies {
play "com.typesafe.play:play_2.11:2.6.2"
play "com.typesafe.play:filters-helpers_2.11:2.6.2"
play "com.typesafe.play:play-guice_2.11:2.6.2"
play "com.typesafe.play:play-ws_2.11:2.6.2"
play "commons-lang:commons-lang:2.6"
compile group: ‘org.scala-lang’, name: ‘scala-library’, version: ‘2.11.2’
}