Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have following build.gradle file:

apply plugin: 'java'
apply plugin: 'eclipse'

sourceCompatibility = 1.7
version = '1.0'

repositories {
    mavenCentral()
}

dependencies {
    compile 'org.springframework:spring-core:4.1.1.RELEASE'
    compile 'org.springframework:spring-context:4.1.1.RELEASE'
    testCompile group: 'junit', name: 'junit', version: '4.+'
}

I run following command:

$ gradle --refresh-dependencies

But it does nothing. The dependencies do not get updated and do not reflect on classpath. The output from command is:

:help

Welcome to Gradle 2.1.

To run a build, run gradle <task> ...

To see a list of available tasks, run gradle tasks

To see a list of command-line options, run gradle --help

BUILD SUCCESSFUL

Total time: 5.999 secs

Doing this via Eclipse gradle plugin is working though.

question from:https://stackoverflow.com/questions/26773292/how-to-update-gradle-dependencies-from-command-line

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
95 views
Welcome To Ask or Share your Answers For Others

1 Answer

gradle --refresh-dependencies <task>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...