-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Add FAQ/usage entry about dependencyResolutionManagement together with gradle-node-plugin #134
Comments
If you set But I don't think your initial issue is related to this, the |
I suspect what you really want is |
It seems so at first glance, but /**
* If this mode is set, any repository declared directly in a project,
* either directly or via a plugin, will be ignored.
*/
PREFER_SETTINGS, I think I will open a It would be great if |
Well you could create the |
Yes, but all those things are just workarounds in my opinion. For now I will continue to declare the repository via |
…management policy in a test. For now, it specifies the PREFER_PROJECT policy, which seems to be equivalent to the former behavior. We also would like the plugin to work with the PREFER_SETTINGS policy but it currently does not. It will maybe change thanks to issue gradle/gradle#15754.
I added a dependency resolution management policy to an integration test. It obviously fails with For now, the test uses |
…management policy in a test. For now, it specifies the PREFER_PROJECT policy, which seems to be equivalent to the former behavior. We also would like the plugin to work with the PREFER_SETTINGS policy but it currently does not. It will maybe change thanks to issue gradle/gradle#15754.
The solution to your problem @dawi is in this comment: gradle/gradle#15754 (comment) I'm repurposing this issue to document how to do this. |
There's a brief integration test that proves that this works, I'll extract that into documentation tomorrow-ish |
…tories declaration is enabled. Add a test to ensure that the plugin works by default when the centralized repositories declaration is enabled and it does not need to download the Node.js bundle.
I added a section in the FAQ explaining how to use the plugin when using the centralized repositories declaration. I also added a test to ensure that the plugin works by default when using the centralized repositories declaration and Please let me know if you have any feedback. Otherwise I think we can close the issue. |
@bsautel I've already configured it in the same way you documented and it works well. Maybe a few suggestions regarding the documentation:
|
Thanks @dawi for your feedback! I fixed that. And I confirm this uses the Groovy DSL. |
The reason for |
And before anyone thinks "Aha! That makes sense, but we should switch to the setter for name as well!" if you do that, IntelliJ will helpfully tell you that you should use the property access syntax instead 😈 |
I've removed the |
url = "foo" doesn't work in kotlin, so while this doesn't look that great, it does work in both languages.
Ok, perfect! Thanks! |
Just in case someone want's to set
@bsautel maybe also something for the faq |
Gradle 6.8 introduces the "Central declaration of repositories".
https://docs.gradle.org/6.8/release-notes.html#central-declaration-of-repositories
If I use this new feature in our project together with the
gradle-node-plugin
, some Java libraries cannot be resolved.To track down the issue, I have added the flag
FAIL_ON_PROJECT_REPOS
to the configuration:This shows the cause of the issue:
It seems that an Ivy repository is added to the project which seems to be the cause of the issue.
The text was updated successfully, but these errors were encountered: