Can we import build.sbt in build.gradle or any plugins to invoke build.sbt?


(Surender Bandi) #1


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.

Surender Bandi.

(Sterling Greene) #2

Gradle can build Play applications:

(Surender Bandi) #3

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?

(Sterling Greene) #4

I believe that it works up until Play 2.6.2 or so in Gradle 4.2:

And in the next release (4.4) will support the latest Play 2.6.x.

(Surender Bandi) #5

That is an awesome information.
Thanks Sterling.
Any clue on the date of gradle 4.4 release?

(Sterling Greene) #6

An RC will be out in the next couple of weeks, so probably a final release ~early December.

(Surender Bandi) #7

So you should be updating the doc ( 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?

(sivakumar gopalakrishnan) #8

Hey sterling!

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(
at org.gradle.internal.UncheckedException.throwAsUncheckedException(
at org.gradle.scala.internal.reflect.ScalaMethod.getMethod(
at org.gradle.scala.internal.reflect.ScalaMethod.(
at org.gradle.scala.internal.reflect.ScalaMethod.(
at org.gradle.scala.internal.reflect.ScalaReflectionUtil.scalaMethod(

	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’

allprojects {
repositories {
maven {
name "typesafe-maven-release"
url “
ivy {
name "typesafe-ivy-release"
url ""
layout “ivy”

model {
components {
play {
platform play: ‘2.6.2’, scala: '2.11’
injectedRoutesGenerator = true

        sources {
            twirlTemplates {
                defaultImports = TwirlImports.SCALA


dependencies {
play ""
play ""
play ""
play ""
play "commons-lang:commons-lang:2.6"
compile group: ‘org.scala-lang’, name: ‘scala-library’, version: ‘2.11.2’