-
Notifications
You must be signed in to change notification settings - Fork 4
Can parse Plugin Repository declarations in settings.gradle #17
Comments
@oehme I've updated the description of this issue with a rough implementation plan and test cases. Let me know if it needs more detail. I'm also sure I've missed a test case or two, but can't think of them right now. |
- Temporarily disable the JavaDoc check for the new interfaces. gradle/stable-plugins-dsl#17
- Initially, they are in `internal` packages. - This means we don't need to worry about having JavaDoc in the interfaces. - We can move them to plublic locations when we're ready. gradle/stable-plugins-dsl#17
I love it when a test case that you thought of before coding things up actually ends up showing a problem in your implementation. Specifically "pluginRepositories block must be a top-level block (not nested)" The We didn't do the same thing for the I'm going to spend a little time looking at the |
- Note, one of the tests is `@NotYetImplemented` :(
I know we initially set out with the intention of "only allow it once and at the top level", but that might conflict with #23 (allow users to inspect the plugin repositories, e.g. restrictive enterprises trying to lock down their builds). What we do need to make clear is that only the top-level block is taken into account when discovering the plugin repositories. Any modifications that are made after the initial pass must result in an exception. |
We could add another method with a different name, yes. But I'd find it pretty confusing if the |
I see what you mean. Most of the analogous constructs in our API do function that way. |
For relative paths, the user currently has to write
The |
Note to self:
|
@DanielThomas You can now try out the new functionality in the examples. |
@DanielThomas We've changed our process a little bit. When you are happy with this feature, please just add the "accepted" label to it. |
@DanielThomas It would be great if you or someone from your team could try out this functionality in our sample projects and let us know if you are happy with it. |
@rspieldenner is our on call guy this week, so I'll punt that to him; but I'll take a look by the end of the day if he doesn't get a chance. |
Sorry we didn't get to this last week. Looking now. |
Motivation
To allow users to specify their custom repositories, Gradle first of all needs to be able to parse the new
pluginRepositories
DSL.Proposed Change
Add a
pluginRepositories {}
block to the DSL ofsettings.gradle
. ThepluginRepositories
block is parsed in the same phase as thebuildScript
block, before the remaining instructions in the settings file are parsed. ApluginRepositories
block is only allowed as a top-level element. It introduces newPluginRepositoriesHandler
andPluginRepository
interfaces which work similarly to theRepositoryHandler
andArtifactRepository
interfaces.The
InitialPassStatementTransformer
andBuildScriptTransformer
classes will be updated to be aware of the special handling needed to deal with thepluginRepositories
DSL block.Test Cases
pluginRepositories
block can be read fromsettings.gradle
pluginRepositories
block supports defining amaven
plugin repositorypluginRepositories
block is not supported inProjectScript
spluginRepositories
block must come before other blocks in thesettings.gradle
scriptpluginRepositories
block must be a top-level block (not nested)pluginRepositores
block is allowed in each scriptCode Review
The text was updated successfully, but these errors were encountered: