Gradle Version: 2.14
Operating System: Irrelevant
Is this a regression? If yes, which version of Gradle do you know it last worked for?
This is not a bug, really, but it is an issue, and not merely a point for discussion, and there’s nowhere else to put such issues… Gradle 2.14 has very strict syntax about what can be placed inside a plugins{}
block.In particular the version element of each item is restricted to being a string literal.
In my situation, which I will explain below, this restriction is a show-stopper - enough to prevent usage of the plugins{}
block in favor of the older “apply” syntax.
I am developing a collection of plugins for our organization, packaged in a jar. I’d really like to use the pluginRepositories{}
feature and the new plugins{}
syntax. But my plugins are changing often, and it has been necessary to define the concept of a “stable” version (defined in the environment) which could be def’d in the top level build.gradle of a multi-project and then all users of the plugin collection could choose that version. Whereas developers of the plugin collection (i.e, me) could, with a simple change of the top level build script, walk out onto the bleeding edge.
But with this restricted syntax, it is impossible to define a stable version and refer to it in a build script. So every time a new version of my plugin collection needs to be released, instead of changing a variable in the global environment, every user of that collection must manually edit all the subproject buildscripts of each project using these plugins. You can’t even change a variable at the root level.
Definitely a problem.