Results 1 to 2 of 2

Thread: STS and Gradle Build Command Line Options

Hybrid View

  1. #1
    Join Date
    Oct 2011
    Location
    TX
    Posts
    1

    Post 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.

    Tom

  2. #2
    Join Date
    May 2010
    Posts
    398

    Default

    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:
    http://issues.gradle.org/browse/GRADLE-1771
    http://issues.gradle.org/browse/GRADLE-1691

    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.
    Kris De Volder -- SpringSource

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •