Hi, <@U06D8R6GQ67>! :wave: Please tell me if there...
# plugin-development
s
Hi, @Oleg Nenashev! πŸ‘‹ Please tell me if there is any officially recommended guideline for naming of plugin IDs. For example, in my case, I want to separate our plugin into two separate ones (for Java and for Scala). So, I’m thinking of naming them πŸ€” Was:
com.example.myplugin
Working version so far:
com.example.myplugin-java
com.example.myplugin-scala
But I don’t really like this mixing of separators πŸ™ƒ
gradle fellow 1
πŸ‘€ 1
o
Thanks! I will check whether we have an official recommendation
πŸ‘ 1
e
@Sergey Morgunov is there any reason you want to split the plugins? Typically, you'd configure based on whatever plugin is applied, like:
Copy code
pluginManager.withPlugin("java") {
    // configure java
}
pluginManager.withPlugin("scala") {
    // configure scala
}
πŸ‘ 1
m
+1, guidelines would be very welcome. I usually try to stay clear of
-
but I don't really know why πŸ™‚
πŸ˜‰ 1
o
So, I got an AI to document the recommendations. Right now we do not have any strict ones, but I will crowd source some best practices and do a PR to the Cookbook
πŸ™Œ 2
p
Personally, I would use com.example.myplugin.java
o
@Philip W Yes, it's one of the ways to do it. My recommendation would be to avoid using "gradle" in Group and Artifact IDs for now as there are some non-technical concerns associated with that. Apart from that, inverted domain Is always a reasonable solution
s
Hi, @Eric Haag! Thanks a lot for your advice. πŸ™ I will check this approach for our case πŸ€” Of course, I would prefer don’t split if it is possible simple smile
y
The suggestion by @Eric Haag is good only if both your plugins live in the same artifact. If, for some reason, you have different classpaths for both plugins, then it it is better to have them in separate subpojects. As to naming of plugin IDs, you can always go with
com.example.myplugin.java
and
com.example.myplugin.scala
πŸ‘Œ 1
s
Thank you, @ysb33r!
πŸ‘ 1