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
When using precompiled script plugins, the dependencies to plugins must be declared as regular dependencies in the build building the precompiled script plugins. Precompiled script plugins cannot declare plugin versions in their plugins block.
But in practice, one can declare a version and it is simply ignored, this is confusing.
// buildSrc/src/main/kotlin/my-script-plugin.gradle.kts
plugins {
id("some") version "1.0"
}
Expected Behavior
At best, the script plugin above can't be compiled and the author can see the compilation error directly in the IDE. At least, the script plugin above fails at runtime with an actionable help message.
Current Behavior
The script plugin above can be compiled successfully and nothing helps the author to know that the version won't be used and that they must declare the dependency in buildSrc/build.gradle.kts. At runtime, that plugin will then fail with Plugin with id 'some' not found.
When using precompiled script plugins, the dependencies to plugins must be declared as regular dependencies in the build building the precompiled script plugins. Precompiled script plugins cannot declare plugin versions in their plugins block.
But in practice, one can declare a version and it is simply ignored, this is confusing.
Expected Behavior
At best, the script plugin above can't be compiled and the author can see the compilation error directly in the IDE. At least, the script plugin above fails at runtime with an actionable help message.
Current Behavior
The script plugin above can be compiled successfully and nothing helps the author to know that the version won't be used and that they must declare the dependency in
buildSrc/build.gradle.kts
. At runtime, that plugin will then fail withPlugin with id 'some' not found.
Context
See gradle/kotlin-dsl-samples#1376
The text was updated successfully, but these errors were encountered: