Announcement Announcement Module
No announcement yet.
STS and Gradle Build Command Line Options Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • STS and Gradle Build Command Line Options

    I want to specify some of the typical gradle command line options when running a gradle build inside STS.

    I've checked out the STS gradle FAQ's and the tutorial and haven't been able to find the answer as to how to specify the common gradle command line options, such as -i, -d, -Dmysysprop=this, -Pmyprop=that

    Though I can 'work around' some of these with property files, environment variables and code to set logging levels inside of the gradle scripts - this is somewhat ugly and inconvenient. I'm trying to make this natural/straight forward/simple for a team of developers.

    The Run As -> Gradle Build... dialogue only seems to give options for choosing the tasks and task order.


  • #2
    Unfortunately, this is simply not possible at the moment. The reason for this is that STS is using the Gradle tooling API and it only provides very limited control over the process that executes gradle builds. This process is a 'gradle daemon' and is started by the tooling API 'behind the scenes' but the tooling API doesn't provide any means to pass arguments like this.

    I agree with you this is a very reasonable thing one might want to do.

    There are somewhat related Gradle issues open already:

    Maybe you want to vote on these issues :-)

    It may be worthwhile creating a separate issue also for STS on the STS issue tracker, although there will not be much I could do until the some progress is made on the tooling API side re passing arguments, options, system properties etc.