Results 1 to 2 of 2

Thread: STS Gradle integration and adding a dependency?

  1. #1
    Join Date
    Feb 2013
    Posts
    7

    Default STS Gradle integration and adding a dependency?

    I have installed the latest milestone gradle integration:

    http://static.springsource.org/sts/d...tallation.html

    After importing a multi-project successfully I need to add a new dependency. But the only way I see that I can do that is by manually typing the dependency into the build.gradle file. And afterwards I needs to refresh the project to make sure the classpath is updated.

    In eg. m2e you get a pop-up box where you can search the local/remote maven repositories and after adding the dependency the classpath is automatically updated.

    Am I missing a view/configuration or is it simply not supported to add dependencies and get them resolved automatically?

  2. #2
    Join Date
    May 2010
    Posts
    398

    Default

    No, you are not missing anything. The only way to add dependencies to a gradle build is by editing the gradle scripts.

    The IDE could/should provide some tools to help you do that. Maybe some kind of content assist to help editing the 'dependencies' section in the build file. But there is not yet any support for that.

    There is one new feature in 3.2.0.M2 that may help a little bit. There is now an option to have the tools automatically trigger the dependencies refresh every time you edit a .gradle file. This option can be enabled in the Gradle preferences page.

    Kris
    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
  •