{"action":"opened","issue":{"url":"https://api.github.com/repos/gradle/gradle/issues/1789","repository_url":"https://api.github.com/repos/gradle/gradle","labels_url":"https://api.github.com/repos/gradle/gradle/issues/1789/labels{/name}","comments_url":"https://api.github.com/repos/gradle/gradle/issues/1789/comments","events_url":"https://api.github.com/repos/gradle/gradle/issues/1789/events","html_url":"https://github.com/gradle/gradle/issues/1789","id":220466248,"number":1789,"title":"Conflict Resolution broken when module group changes","user":{"login":"idanavisar","id":27138224,"avatar_url":"https://avatars3.githubusercontent.com/u/27138224?v=3","gravatar_id":"","url":"https://api.github.com/users/idanavisar","html_url":"https://github.com/idanavisar","followers_url":"https://api.github.com/users/idanavisar/followers","following_url":"https://api.github.com/users/idanavisar/following{/other_user}","gists_url":"https://api.github.com/users/idanavisar/gists{/gist_id}","starred_url":"https://api.github.com/users/idanavisar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idanavisar/subscriptions","organizations_url":"https://api.github.com/users/idanavisar/orgs","repos_url":"https://api.github.com/users/idanavisar/repos","events_url":"https://api.github.com/users/idanavisar/events{/privacy}","received_events_url":"https://api.github.com/users/idanavisar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-09T11:53:49Z","updated_at":"2017-04-09T11:53:49Z","closed_at":null,"body":"<!--- Provide a brief summary of the issue in the title above -->\r\n\r\nAn old transiently dependent module that was \"masked\" by a new module, is still listed in the runtime configurations.\r\nI added a task that copies the dependencies (i.e. `copyRuntimeLibs`) to **build/runtimeLibs**.\r\n\r\n### Expected Behavior\r\nOld module which is \"replaced\" by the newer version module should **not** be included **build/runtimeLibs**.\r\n\r\n### Current Behavior\r\nBoth the old module and the module are found in **build/runtimeLibs**.\r\n\r\n### Context\r\nI discovered this when I upgraded our build from Gradle 1.11 to Gradle 3.4.1. Suddenly our task that would create a distribution zip included **org.apache.commons:commons-io:1.3.2** in addition to **commons-io:commons-io:2.4**.\r\nThis caused tests to fail since the JVM loaded the old module instead of the new...\r\n\r\n### Steps to Reproduce (for bugs)\r\n<!--- Provide a link to a build scan, example project, or an unambiguous -->\r\n<!--- set of steps to reproduce this bug. Include code to reproduce, if relevant -->\r\n\r\nHere's a build.gradle that reproduces the problem pretty clearly:\r\n```gradle\r\nplugins {\r\n    id 'com.gradle.build-scan' version '1.6'\r\n}\r\n\r\nbuildScan {\r\n    licenseAgreementUrl = 'https://gradle.com/terms-of-service'\r\n    licenseAgree = 'yes'\r\n}\r\n\r\napply plugin: 'java'\r\n\r\n/**\r\n * This explicit resolution strategy block is required in Gradle 3.4.1 to avoid including\r\n * org.apache.commons:commons-io:1.3.2 in the list of depenencies.\r\n * Gradle 1.11 handles this without this block\r\n *\r\nconfigurations.all {\r\n  resolutionStrategy.eachDependency { DependencyResolveDetails details ->\r\n    if (details.requested.group == 'org.apache.commons' &&\r\n    \tdetails.requested.name == 'commons-io') {\r\n    \t  details.useTarget group: 'commons-io', name: 'commons-io', version: '2.4'\r\n    }\r\n  }\r\n}\r\n*/\r\n\r\nrepositories {\r\n  jcenter()\r\n}\r\n\r\ntask wrapper(type: Wrapper) {\r\n  gradleVersion = '3.4.1'\r\n}\r\n\r\n\r\ndependencies {\r\n  //jmxterm has a transient depenendcy on 'org.apache.commons:commons-io:1.3.2'\r\n  compile 'org.cyclopsgroup:jmxterm:1.0-alpha-4'\r\n  //should conflict with 'org.apache.commons:commons-io:1.3.2' and override it\r\n  compile 'commons-io:commons-io:2.4'\r\n}\r\n\r\ntask copyRuntimeLibs(type: Copy) {\r\n    into \"build/runtimeLibs\"\r\n    from configurations.runtime\r\n    doFirst() {\r\n    \tprint 'Contents of build/runtimeLibs before copy: '\r\n    \tprintln new File('build/runtimeLibs').listFiles()\r\n    }\r\n    doLast{\r\n\tprint 'Contents of build/runtimeLibs after copy: '\r\n\tprintln new File('build/runtimeLibs').listFiles()\r\n    }\r\n}\r\n\r\ntask printConfigurationLibs() {\r\n  doLast() {\r\n    configurations.each { config ->\r\n      println \"$config\"\r\n      config.allDependencies.each { println \"  $it\" }\r\n      println ''\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n### Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n<!--- A build scan `https://scans.gradle.com/get-started?type=project` is ideal -->\r\nReproduced on Ubuntu 14.0.4 with Java 7u121 jdk.\r\n * Build scan URL: \r\nhttps://scans.gradle.com/s/rqt2v6zcecwh6"}}
{"actor":{"display_login":"idanavisar"}}