I had the same problem and the documentation for Gradle is very general and vague. I sometimes think that only Gradle developers can get the full potential of this wonderful tool :)
Currently, the path is this: Gradle build script:
jettyRun { httpPort = 9000 }
It looks like you cannot set this value on the command line. There was a problem for this, GRADLE-1224 , but it was closed as "It will not be fixed," because
The Jetty plugin is deprecated and is planned to be removed using Gradle 4.0. We will no longer work on this issue.
Tomek cejner
source share