I’m trying to apply a Gradle plugin from source.
I figured out how to do it using the legacy
branch = "master"
apply plugin: 'com.verificationgentleman.gradle.hdvl.systemverilog'
Is it possible to do the same, but use the
plugins block instead?
No that is not possible at the moment. The reason is that source dependencies are resolved lazy at the moment. That is, only once the dependency is resolved the repository is cloned/updated.
For the plugins block, Gradle would need to do this upfront to know which plugins are provided by a source dependency. For that we would need a special mechanism that allows you to declare such a source dependency for this “early resolution”.
We are working on improving the mechanism for local included builds (see https://github.com/gradle/gradle/pull/15317). In the future it might be possible to build on top of that for source dependencies.
Thanks for the info! As long as the
apply(...) mechanism sticks around until source dependencies are available for “early resolution” it should be fine.