playframework icon indicating copy to clipboard operation
playframework copied to clipboard

Adding the possibility to disable continuous build for the 'runPlay' task

Open PaulFridrick opened this issue 6 years ago • 1 comments

Could we have the possibility to disable the continuous build for the task 'runPlay' ? In my case, many unnecessary rebuilds are triggered when I change conf files of my Play project, or front source files which are located in a submodule of my Play project...

The same issue is open for the old Gradle Play plugin : https://github.com/gradle/gradle/issues/5026

PaulFridrick avatar Oct 14 '19 15:10 PaulFridrick

If someone has the same issue, I managed to create a new task that does what I need :

task run(type: JavaExec) {
    classpath = sourceSets.main.runtimeClasspath
    main = 'play.core.server.ProdServerStart'

    jvmArgs = ['-Dhttp.port=9000', '-Dconfig.file=./conf/application.conf']
}

The jvmArgs are optional if you use the default port and conf file, this example shows how to override it.

For the devs of the plugin: As a user of this plugin, I think it could be useful to have the possibility to run Play in this way out of the box. Maybe you could provide an equivalent task in the plugin ?

PaulFridrick avatar Nov 19 '19 11:11 PaulFridrick