This message was deleted.
# plugin-development
s
This message was deleted.
t
Use
project.git
a
j
I don't think you can get accessors for
allprojects
so you need to do
the<Git>()
1
t
The issue (IMO, see above) is that
publishing.repositories
can itself have extensions, and the type-safe accessors will look at the closest extensible object, so won't find the
git
extension registered at the project level.
j
Indeed, I wouldn't expect this to work
allprojects.publishing
, how does it know that all modules are applying the
maven-publish
plugin?
a
It would be best, and very much appreciated, if you avoided using
allprojects {}
(and
subprojects {}
) :) They usually cause problems - see the docs here, here, and here.
2
v
Shown code is even worse, as it does not even register a callback for all projects, but configures them right away in their current state.
t
Oh, looked closer at the plugin's code: it can only declare
project.repositories
, not
publishing.repositories
. The plugin would have to handle it (by registering the
git
extension also to
publishing.repositories
whenever the
maven-publish
plugin is applied)
1
1
j
how do I get the Maven Publish types into my module, do I add it with implementation? What do I add as the implementation?
v
They are built-in, so always available, no dependency necessary
j
Thank you! I was just being very stupid!
👌 1