Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using JVM packages for precompiled script plugins, rather that . in the file name. #9

Open
yogurtearl opened this issue Sep 7, 2022 · 2 comments

Comments

@yogurtearl
Copy link

Currently this repo uses . in the file name of precompiled script plugins.

i.e. a file at src/main/kotlin/com.example.repositories.settings.gradle.kts

can applied with:

plugins {
    id("com.example.repositories")
}

Like this:

image

image

But this alternative using JVM packages accomplishes the same thing:
The below can also be applied with:

plugins {
    id("com.example.repositories")
}

image

image

I tend to prefer the second one because it matches the pattern of normal kotlin source code.

Is there a reason that using . in the file name rather than JVM packages is seen a more idiomatic?

Also, maybe consider turning on the Github Discussions feature on this repo, for items like this. :)

@jjohannes
Copy link
Owner

I think both options are fine and I don't really prefer one over the other.

The reason why I use the one without package in all examples is that the package is not supported in the Groovy DSL. Many users use that for various reasons and I prefer to have setups that work with both DSLs similarly.

@jjohannes
Copy link
Owner

Also, maybe consider turning on the Github Discussions feature on this repo, for items like this. :)

I have to think about this. I am reluctant to open even more communication channels...

Please continue to post any question/discussion as issues here. I think I'll add a kind of FAQ section to the Readme and then link question/discussion issues from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants