Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies do not refreshed. #37

Closed
joyfulj opened this issue Sep 20, 2017 · 2 comments
Closed

Dependencies do not refreshed. #37

joyfulj opened this issue Sep 20, 2017 · 2 comments

Comments

@joyfulj
Copy link

joyfulj commented Sep 20, 2017

Hi, I like your gradle-testsets-plugin.
This is very useful for my work.

But there is a trouble. I wish it could be solved.

If I add dependencies in dependencies, They are not refreshed.
For example, I add my SNAPSHOT library in dependencies.

integrationTestCompile group: 'com.mygroup', name: 'my-library', version: '1.0.0-SNAPSHOT'

After I deploy new SNAPSHOT library in my local nexus repository,
New SNAPSHOT library is not downloaded from nexus.

'gradle --refresh-dependencies' options did not work.

configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

'cacheChangingModulesFor' configuration did not work.

'changing=true' option also did not work.

To solve this problem,
I have to remove my gradle cache metadata descriptors.

/Users/myuser/.gradle/caches/modules-2/metadata-2.23/descriptors

or
I should put my library into testCompile

testCompile group: 'com.mygroup', name: 'my-library', version: '1.0.0-SNAPSHOT'

Thanks.

@tkrullmann
Copy link
Member

Hi,
the test sets plugin doesn't deal with dependencies at all, just configurations - so I think that the issue might not directly be related to the plugin.

As far as I know Gradle doesn't assign any special meaning to SNAPSHOT dependencies - that's purely a Maven concept. So for resolutionStrategy.cacheChangingModulesFor to have any effect, you probably need to mark your dependency as changing manually:

integrationTestCompile group: 'com.mygroup', name: 'my-library', version: '1.0.0-SNAPSHOT', changing: true

see https://docs.gradle.org/current/javadoc/org/gradle/api/artifacts/ExternalModuleDependency.html#setChanging(boolean)

@tkrullmann
Copy link
Member

Did this work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants