You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm trying to add additional list items to <change-notes> in the Gradle task patchPluginXml of Gradle IntelliJ Plugin. I'm trying to modify output of the Changelog Plugin. Unfortunately, function org.jetbrains.changelog.Changelog.Item.plus loses the value of withHeader and other boolean flags, which were set up in the call chain before plus() is invoked.
Below is a minimal example that doesn't require Gradle IntelliJ Plugin.
To Reproduce
This is code, slightly modified from IntelliJ Platform Plugin Template. Two methods withHeader and withEmptySections are used as an example – these are just the two boolean flags that I've checked, others are probably affected in the same way.
Put the following code at the top level of the build.gradle.kts, for simplicity:
Describe the bug
I'm trying to add additional list items to
<change-notes>
in the Gradle taskpatchPluginXml
of Gradle IntelliJ Plugin. I'm trying to modify output of the Changelog Plugin. Unfortunately, functionorg.jetbrains.changelog.Changelog.Item.plus
loses the value ofwithHeader
and other boolean flags, which were set up in the call chain beforeplus()
is invoked.Below is a minimal example that doesn't require Gradle IntelliJ Plugin.
To Reproduce
This is code, slightly modified from IntelliJ Platform Plugin Template. Two methods
withHeader
andwithEmptySections
are used as an example – these are just the two boolean flags that I've checked, others are probably affected in the same way.build.gradle.kts
, for simplicity:CHANGELOG.md
:./gradlew
Actual behavior
Header
## [Unreleased]
is printed in the log, empty section is absent:Expected behavior
Header is not printed in the log, empty section is present:
Environment:
Additional context
with*
functions after theplus
function:copy()
works in Kotlin, but this bug has something to do with the fact that functionplus()
is not callingprivate fun copy
. Instead, the constructor, which sets the default values for affected flags is invoked.The text was updated successfully, but these errors were encountered: