ljacomet / logging-capabilities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider making the alignment feature opt-in or opt-out

ljacomet opened this issue · comments

Given that Gradle has a bug that prevents capabilities conflict detection to work when there are also virtual platforms at play on the same dependencies (gradle/gradle#12011), maybe the alignment feature of the plugin should be opt-in or opt-out.

Unfortunately that means a later activation of the component metadata rule handling the virtual platform alignment, which might result in missed dependencies to align. This could be the case if resolution happens during the configuration phase, before the rule has been added.

As indicated on the linked issue, this will impact users of the plugin on Gradle 5.2 to 6.1 inclusive.

After giving it more thought, the following will be done:

  • Disable alignment by default when the plugin is used with Gradle [5.2,6.2[
  • Offer an option to enable back alignment on the extension. However this option will only be available for Gradle 6+ given that the extension requires it.

Hey, in the fix you have the code

if (gradleVersion.compareTo(GRADLE_5_2) < 0 && gradleVersion.compareTo(GRADLE_6_2) >= 0) {
    configureAlignment(dependencies);
}

gradleVersion < '5.2' AND gradleVersion >= '6.2' ?

Isn't this always false?