semantic-version-gradle-plugin
semantic-version-gradle-plugin copied to clipboard
Failed to apply plugin due to missing project version, when there is one in build.gradle.kts
Describe the bug After adding the plugin to the "plugins" block section and running the configure task "prepareKotlinBuildScriptModel", the semantic-version-gradle-plugin fails during the apply phase due to a missing project version that is actually in place.
To Reproduce Steps to reproduce the behavior:
- Have a springboot 3.0.1 project with gradle 7.6 and a Kotlin-based build.gradle.kts
- Add "version" to build.gradle.kts
- Add "com.dipien.semantic-version" (version 2.0.0) to the plugins block section
- Run configure task "prepareKotlinBuildScriptModel"
- See error
Expected behavior It should detect the project's version so the plugin can be successfully applied
Screenshots
Additional context I suspected it would be caused by a race condition of not having the project object created during the "Add/Apply Plugins" section, and added the workaround on not applying the plugin until the task "prepareKotlinBuildScriptModel" is done and it seems to be working perfectly fine after that:

Nevertheless, this workaround should not be needed.
Hi. The plugin doesn't support the new way to apply plugins. You should use the legacy way, as described on the readme
Hey I am having the same issue. How about a update to support the new way of declaring plugins?
Hello. I have the same issue.