This message was deleted.
# community-support
s
This message was deleted.
l
Regarding your first question, I know of two issues that you can follow (and vote for :)): https://github.com/gradle/gradle/issues/9282, https://github.com/gradle/gradle/issues/17963 I'm not sure I understand the second question
v
Everything works but getting the dependency notation for the Gradle plugins is annoying.
What is so annoying in using
<plugin id>:<plugin id>.gradle.plugin:<plugin version>
? Of course it is not super convenient which is why those tickets exist and even a PR that will hopefully fix it. But it's not that bad and you can write a helper function that does it for you easily. Regarding the repositories, you could refactor out those repository declarations into another included build that you then use from within the
build-logic
plugin and in the settings script of the main build.
p
Don't know why I not getting notifications. Regarding getting the fqn of a plugin, thanks for the hint with the plugin id! I guess this syntax is used when gradle resolves the plugin? Because some plugins use another name, like
gradle.plugin.com.github.johnrengelman:shadow:7.1.2
for
com.github.johnrengelman.shadow
. Upvoted both issues. Okay, adding another
includeBuild
just for the repos would be possible, but a little bit overkill for 4 lines. I already use a
Settings
plugin in the
build-logic
like this:
Copy code
pluginManagement {
    repositories {
        maven(url = "<https://oss.sonatype.org/content/repositories/snapshots>")
        mavenCentral()
        gradlePluginPortal()
    }
    includeBuild("build-logic")
}

plugins {
    id("MyRepos")
}
but applying the settings plugin
MyRepos
without adding the repositories still fails.
v
Because some plugins use another name, like
gradle.plugin.com.github.johnrengelman:shadow:7.1.2
for
com.github.johnrengelman.shadow
.
Thats the coordinates of the actual code-containing artifact. Then you have an additional marker artifact for each plugin in that code artifact following that naming pattern, that is used to resolve from plugin id to some artifact, exactly.
but applying the settings plugin
MyRepos
without adding the repositories still fails.
Yeah, that's hen-and-egg problem of course. If that settings plugin needs to come from a repo you have to declare the repo first.
p
Nope, the settings plugin
MyRepos
is declared in
build-logic
too. Otherwise I would totally agree.