Hello, folks! I have a project that imports two p...
# community-support
k
Hello, folks! I have a project that imports two plugins
Copy code
plugins {
    id 'org.jetbrains.changelog' version '2.2.1'
    id "me.modmuss50.mod-publish-plugin" version "0.5.2"
}
changelog
has some extension methods for grabbing sections of a keep-a-changelog formatted changelog for a particular version. I would like to use this to populate a field of a task from the
mod-publish-plugin
plugin, which field is also called
changelog
. This appears to be a name conflict, because when I try to use the extension methods of the
changelog
plugin inside the
publishMods
task with the
changelog
field, Gradle thinks I am referring to the field and not the plugin. Is there a way I can make the thing I am referring to explicit and resolve Gradle's confusion? Gradle 8.8, using Groovy syntax.
e
Copy code
project.changelog
k
That will be the field, not the plugin?
That gets me
There's an extension registered with name 'changelog'. You should not reassign it via a property setter.
ah, figured it out, the changelog property only exists on that task so publishMods.changelog = does the trick.
thanks
e
I don't think you understood… and you're configuring the
publishMods
extension, not task
I meant like
Copy code
publishMods {
    changelog = project.changelog.getUnreleased().summary
}
or whatever you else you want to do with it
k
got it. that works. i was confusing myself by mixing up the terminology. thanks again.