Quantcast

Detached configuration to copy ResolutionStrategy

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Detached configuration to copy ResolutionStrategy

Lóránt Pintér-2
Hi,

I’d like to use this snippet in an init script to disable caching for dynamic versions everywhere:

allprojects {
configurations.all {
resolutionStrategy {
cacheDynamicVersionsFor 0, "seconds"
}
}
}

It works fine for project configurations, but unfortunately when I create some detached configurations, those will not get this closure applied to them. Is there a way I can specify the same resolution strategy to detached configurations as well?

Thanks.

-- 

Lóránt Pintér

Developer at Prezi

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detached configuration to copy ResolutionStrategy

Adam Murdoch

On 12 Aug 2014, at 7:42 am, Lóránt Pintér <[hidden email]> wrote:

Hi,

I’d like to use this snippet in an init script to disable caching for dynamic versions everywhere:

allprojects {
configurations.all {
resolutionStrategy {
cacheDynamicVersionsFor 0, "seconds"
}
}
}

It works fine for project configurations, but unfortunately when I create some detached configurations, those will not get this closure applied to them. Is there a way I can specify the same resolution strategy to detached configurations as well?

Not yet, but we really need something. It causes issues in the IDE plugins and when you’re using the artefact query API. It will also cause problems in the native language plugins and the new jvm language plugins.

There will probably be two pieces, which continue on from the version selector stuff we’re currently adding. One would be some convenience to set the policy for all resolution (via whatever mechanism happens to be used) and some way to set the policy for each individual resolution.

I think for most people, just setting the global policy would be sufficient.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
CTO Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detached configuration to copy ResolutionStrategy

Lóránt Pintér
Looking forward to this. Meanwhile I've managed to work around the specific problem by copying an existing project configuration without its dependencies.

-- 
Lóránt

On 2014.08.12., at 1:28, Adam Murdoch <[hidden email]> wrote:


On 12 Aug 2014, at 7:42 am, Lóránt Pintér <[hidden email]> wrote:

Hi,

I’d like to use this snippet in an init script to disable caching for dynamic versions everywhere:

allprojects {
configurations.all {
resolutionStrategy {
cacheDynamicVersionsFor 0, "seconds"
}
}
}

It works fine for project configurations, but unfortunately when I create some detached configurations, those will not get this closure applied to them. Is there a way I can specify the same resolution strategy to detached configurations as well?

Not yet, but we really need something. It causes issues in the IDE plugins and when you’re using the artefact query API. It will also cause problems in the native language plugins and the new jvm language plugins.

There will probably be two pieces, which continue on from the version selector stuff we’re currently adding. One would be some convenience to set the policy for all resolution (via whatever mechanism happens to be used) and some way to set the policy for each individual resolution.

I think for most people, just setting the global policy would be sufficient.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
CTO Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com



Loading...