JakeWharton / hugo

Annotation-triggered method call logging for your debug builds.
Apache License 2.0
7.92k stars 797 forks source link

Remove + from dependencies #68

Closed dalewking closed 9 years ago

dalewking commented 9 years ago

The dependency specified for the gradle build tools is specified as version 0.7+. Dependencies should always specify specific versions not wildcards.

This becomes a problem for me in that our Nexus repo is behind a VPN. About once a day gradle decides to update its + dependencies. If I do not happen to be connected to the VPN what happens is that Android Studio locks up for 3 or 4 minutes trying to update the dependency and you have to either wait or force quit.

The workaround I am using is to add this to buildScript block:

// The purpose of this is to override the transitive dependency from hugo that specifies
// 'com.android.tools.build:gradle:0.7+' which forces accessing the remote repo
configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        if (details.requested.group == 'com.android.tools.build' && details.requested.name == 'gradle') {
            details.useVersion '1.0.0'
        }
    }
}
JakeWharton commented 9 years ago

There's already an issue for this. Nice hack though! On Jan 23, 2015 6:59 PM, "Dale King" notifications@github.com wrote:

The dependency specified for the gradle build tools is specified as version 0.7+. Dependencies should always specify specific versions not wildcards.

This becomes a problem for me in that our Nexus repo is behind a VPN. About once a day gradle decides to update its + dependencies. If I do not happen to be connected to the VPN what happens is that Android Studio locks up for 3 or 4 minutes trying to update the dependency and you have to either wait or force quit.

The workaround I am using is to add this to buildScript block:

// The purpose of this is to override the transitive dependency from hugo that specifies // 'com.android.tools.build:gradle:0.7+' which forces accessing the remote repo configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> if (details.requested.group == 'com.android.tools.build' && details.requested.name == 'gradle') { details.useVersion '1.0.0' } } }

— Reply to this email directly or view it on GitHub https://github.com/JakeWharton/hugo/issues/68.

dalewking commented 9 years ago

Actually, I think I started typing the issue before #67 was submitted, just didn't hit submit. But as long as it is covered

JakeWharton commented 9 years ago

I promise I'm on it soon. Meant to yesterday but got tied up. On Jan 23, 2015 7:04 PM, "Dale King" notifications@github.com wrote:

Closed #68 https://github.com/JakeWharton/hugo/issues/68.

— Reply to this email directly or view it on GitHub https://github.com/JakeWharton/hugo/issues/68#event-224095402.

cesards commented 9 years ago

@JakeWharton is this hack gonna be applyied finally? Thx!