问题
I am using the buildship plugin to build gradle projects. I need to use some env variables in my build script to connect to some external repositories. When i run the gradle build from command line, it works fine as I have the required env variables. I would like to run the build from eclipse.
I do not see an Environment tab in the run configuration window. How do i set env variables for gradle build in eclipse?
Here is where i need the env variables
repositories {
    mavenCentral()
    maven {
            def mvnRpoUrl = "https://some/url/1"
            url mvnRpoUrl
            credentials {
                username "$System.env.USER_ID1"
                password "$System.env.PASSWORD1"
            }
     }
     maven {
            def mvnRpoUrl = "https://some/other/url"
            url mvnRpoUrl
            credentials {
                username "$System.env.USER_ID2"
                password "$System.env.PASSWORD2"
        }
    }
}
    来源:https://stackoverflow.com/questions/50860982/eclipse-how-to-set-env-variables-for-gradle-run