Check property existence with providers#1032
Conversation
|
@wakingrufus do you want me to update the changelog? I'm not sure how do you proceed with releases. If you want to manage the changelog or prefer that contributors do it. |
|
|
Changelog updated, and I've also fixed another Project Isolation compatibility with the format task. Let me know if what I removed was strictly necessary. I think it was not. |
| val rootProjectName = project.rootProject.name | ||
| var parentProject: Project? = project.parent | ||
| while (parentProject != null && parentProject.name != rootProjectName) { | ||
| val parentProjectPath = parentProject.path | ||
| parentProject.plugins.withId("org.jlleitschuh.gradle.ktlint") { | ||
| mustRunAfter("$parentProjectPath:${KtLintFormatTask.KOTLIN_SCRIPT_TASK_NAME}") | ||
| } | ||
| parentProject = parentProject.parent | ||
| } | ||
|
|
There was a problem hiding this comment.
@wakingrufus accessing parent plugins violates Project Isolation. I think this task enforcement is not necessary. Can you check it please?
There was a problem hiding this comment.
Yeah, I think this task ordering is only a nice to have, but should not be strictly needed
| val rootProjectName = project.rootProject.name | ||
| var parentProject: Project? = project.parent | ||
| while (parentProject != null && parentProject.name != rootProjectName) { | ||
| val parentProjectPath = parentProject.path | ||
| parentProject.plugins.withId("org.jlleitschuh.gradle.ktlint") { | ||
| mustRunAfter("$parentProjectPath:${KtLintFormatTask.KOTLIN_SCRIPT_TASK_NAME}") | ||
| } | ||
| parentProject = parentProject.parent | ||
| } | ||
|
|
There was a problem hiding this comment.
Yeah, I think this task ordering is only a nice to have, but should not be strictly needed
04d8260 to
7e15068
Compare
CHANGELOG.md
Outdated
| and this project adheres to [Semantic Versioning](https://semver.org/). | ||
|
|
||
| ## [Unreleased] | ||
| - Make plugin compatible with Isolated Projects [#1032](https://github.com/JLLeitschuh/ktlint-gradle/pull/1032#issuecomment-3860666022) |
There was a problem hiding this comment.
this fails validation, I think because the link to the pr has a deeplink to a comment in it
There was a problem hiding this comment.
Fixed. Let's see if that works now 🙂
25f1147 to
fcf5940
Compare
|
I fixed the workflows. Sorry for not running them on my local machine beforehand. |
|
Hey guys, did anyone had time to review this PR? |
|
Friendly reminder. Could someone take a look at this one please? |
Make the property check compatible with Isolated Projects
Make format task compatible with Isolated Projects by preventing to access parent project plugins. I think that restriction was not necessary, and it was introduced a while back while fixing some Gradle 7 warnings. This parent dependency was not related to the warnings, and probably is not needed anymore.
fcf5940 to
e69999f
Compare
Make plugin compatible with Isolated Projects
Should fix #805, at least this comment #805 (comment)