Taras
Taras

Reputation: 1023

How to pass parameters to gradle in eclipse Buildship plugin while importing project

I'm importing a gradle project requiring parameters into eclipse neon using the buildship gradle plugin. Here is a fragment of the build.gradle with parameters:

repositories {
    maven {
        url repoUrl
        credentials {
            username repoUsername
            password repoPassword
        }
    }
}

I usually just add the parameters on the gradle command line:

gradlew eclipse build -PrepoUrl="http://localhost:9080/nexus/content/groups/internal/" -PrepoUsername="user1" -PrepoPassword="xxxxxxxxxx"

I can't find a possibility to pass the parameters while importing the project with the Buildship plugin. I'm using version 2.0.0 on neon release. Setting the GRADLE_OPTS environment variable doesn't help as it doesn't seem to be used by the plugin.

Is there another way to set the variables from outside so the credentials aren't stored in the project files?

Upvotes: 3

Views: 7164

Answers (1)

Tou Hat
Tou Hat

Reputation: 59

You should go Window->Preferences->Gradle and then pass your arguments into "Program Arguments" section

Upvotes: 3

Related Questions