Closed jkschneider closed 1 year ago
Just FYI, order matters here:
Success:
plugins {
id "org.openrewrite.rewrite" version "latest.release"
id "io.moderne.rewrite" version "latest release"
}
Failure:
plugins {
id "io.moderne.rewrite" version "latest release"
id "org.openrewrite.rewrite" version "latest.release"
}
Thanks @shanman190. Noticed this. Trying to find a way to either remove the existing extension/tasks from moderne plugin when OSS plugin already applied or determine that the rewrite plugin will be later applied.
So the easiest way at the moment would be to just swap the OSS plugin to TaskContainer#maybeCreate(..)
. That would resolve the issue so that order no longer mattered.
If we were talking about this more longer term, you'd probably have to ask the TaskContainer
if it knew about an extension named rewrite
, if none existed register one. If one exists, then apply any configurations.
EDIT: just a note that this second mechanism would require moving the base Gradle version from 4.0 which isn't desired at this time.
This has been fixed as of 5.34.0
Both try to configure an extension named
rewrite
.