forked from JetBrains/kotlin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the localToProject attribute schema for Gradle 4.10.2+
In Gradle 4.10.2, a change was made in the attributes disambiguation process: if some of the candidates have a single attribute value and others don't have that attribute (i.e. have a null value), the disambiguation rule for that attribute doesn't get called. Effectively, null values are excluded from disambiguation, but still may cause ambiguity (sic!) See: gradle/gradle#6747 (comment) This change affected our attribute `localToProject` that we use to disambiguate the deprecated but still consumable configurations like `compile`, `runtime`, `testCompile`, `testRuntime` from those configurations which should have priority during project dependency resolution: the `*Element` ones. Our scheme marked the former configurations with the attribute and the latter were not marked, with a disambiguation rule that preferred null values. To fix this logic with Gradle 4.10.2, we instead mark both kinds of configurations with the attribute, which now has a value 'public' that is preferred by the rule over the other values. We also make sure that the attribute doesn't leak into the published Gradle metadata, as it is only needed for project-to-project dependencies resolution. Issue #KT-28795 Fixed
- Loading branch information
Showing
6 changed files
with
37 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters