{"action":"closed","issue":{"url":"https://api.github.com/repos/nebula-plugins/gradle-dependency-lock-plugin/issues/76","repository_url":"https://api.github.com/repos/nebula-plugins/gradle-dependency-lock-plugin","labels_url":"https://api.github.com/repos/nebula-plugins/gradle-dependency-lock-plugin/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/nebula-plugins/gradle-dependency-lock-plugin/issues/76/comments","events_url":"https://api.github.com/repos/nebula-plugins/gradle-dependency-lock-plugin/issues/76/events","html_url":"https://github.com/nebula-plugins/gradle-dependency-lock-plugin/issues/76","id":118698524,"number":76,"title":"The force resolution strategy takes a lower precedence than useTarget","user":{"login":"DanielThomas","id":1479220,"avatar_url":"https://avatars.githubusercontent.com/u/1479220?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielThomas","html_url":"https://github.com/DanielThomas","followers_url":"https://api.github.com/users/DanielThomas/followers","following_url":"https://api.github.com/users/DanielThomas/following{/other_user}","gists_url":"https://api.github.com/users/DanielThomas/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielThomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielThomas/subscriptions","organizations_url":"https://api.github.com/users/DanielThomas/orgs","repos_url":"https://api.github.com/users/DanielThomas/repos","events_url":"https://api.github.com/users/DanielThomas/events{/privacy}","received_events_url":"https://api.github.com/users/DanielThomas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nebula-plugins/gradle-dependency-lock-plugin/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/nebula-plugins/gradle-dependency-lock-plugin/milestones/1","html_url":"https://github.com/nebula-plugins/gradle-dependency-lock-plugin/milestones/4.3.0","labels_url":"https://api.github.com/repos/nebula-plugins/gradle-dependency-lock-plugin/milestones/1/labels","id":1430111,"number":1,"title":"4.3.0","description":"","creator":{"login":"DanielThomas","id":1479220,"avatar_url":"https://avatars.githubusercontent.com/u/1479220?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielThomas","html_url":"https://github.com/DanielThomas","followers_url":"https://api.github.com/users/DanielThomas/followers","following_url":"https://api.github.com/users/DanielThomas/following{/other_user}","gists_url":"https://api.github.com/users/DanielThomas/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielThomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielThomas/subscriptions","organizations_url":"https://api.github.com/users/DanielThomas/orgs","repos_url":"https://api.github.com/users/DanielThomas/repos","events_url":"https://api.github.com/users/DanielThomas/events{/privacy}","received_events_url":"https://api.github.com/users/DanielThomas/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":3,"state":"open","created_at":"2015-11-25T21:41:29Z","updated_at":"2016-05-02T21:07:01Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-11-24T20:41:49Z","updated_at":"2016-05-02T21:07:00Z","closed_at":"2016-05-02T21:07:00Z","body":"The plugin currently uses `force` to force locked versions, however this interacts poorly with builds that use `eachDependency`, as any `useTarget` there will take precedence over the `force`:\r\n\r\nhttps://docs.gradle.org/current/dsl/org.gradle.api.artifacts.ResolutionStrategy.html#org.gradle.api.artifacts.ResolutionStrategy:eachDependency(org.gradle.api.Action)\r\n\r\nFor example, if you use this code to assume `latest.release` for dependencies without versions specified, the latest release is always used:\r\n\r\n    configurations.all({\r\n        resolutionStrategy {\r\n            eachDependency { details ->\r\n                def requested = details.requested\r\n                if (requested.version == '') {\r\n                    details.useTarget group: requested.group, name: requested.name, version: 'latest.release'\r\n                }\r\n            }\r\n        }\r\n    })\r\n\r\nWe need to add tests that keep track of the Gradle contract for which `resolutionStrategy` wins, and move to that instead of `force`."}}