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

Consider automatically adding 'svm' dependency #377

Open
JakeWharton opened this issue Aug 11, 2020 · 3 comments
Open

Consider automatically adding 'svm' dependency #377

JakeWharton opened this issue Aug 11, 2020 · 3 comments

Comments

@JakeWharton
Copy link

In order to help out Graal, I very often add

compileOnly "org.graalvm.nativeimage:svm:20.1.0"

as a dependency.

Lately I've been doing

compileOnly "org.graalvm.nativeimage:svm:${graal.graalVersion.get()}"

to avoid the split brain problem for the version specification.

It would be nice if this dependency was added automatically. Being compileOnly it doesn't affect downstream consumers like the normal application plugin output or a shadow jar or the like.

Just in case this has some negative interaction, a property could be added to disable this functionality.

graal {
  svmDependency false
}

(or whatever you want to call it)

@yschimke
Copy link

Be careful with ordering here, if your dependencies are listed before the grall config, you get the default version. Also I think you can drop the get(), I assume toString does the right thing.

@JakeWharton
Copy link
Author

True. It probably would need applied in afterEvaluate to ensure the user has set their desired version.

@yschimke
Copy link

Also relevant you can easily trigger #148 if you use implementation instead of compileOnly

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

No branches or pull requests

2 participants