download feature breaks settings repository
This plugin offers a functionality to download Node.js. If this functionality is used this plugin registers a new ivy repository for gradle. This doesnt work very well if a user defines their repositories in settings.gradle.kts. Depending on the value chosen for: org.gradle.api.initialization.resolve.RepositoryMode this will mean one of the following:
- PREFER_PROJECT: The registration of this Plugin will work, but gradle will drop previously working repositories defined in settings.gradle
- PREFER_SETTINGS: This registration of this Plugin will be ignored
- FAIL_ON_PROJECT_REPOS: The build will fail.
That's absolutely correct, the repository mode is working exactly as intended as it lets you configure this This is covered in our FAQ https://github.com/node-gradle/gradle-node-plugin/blob/main/docs/faq.md#is-this-plugin-compatible-with-centralized-repositories-declaration
many thanks I admitedly have not read this :) As far as I understand gradle there is unfortunately no way to print a warning when somehting like this happens so I guess we will just implement linked solution. Thank you!
I feel like there's a 4th mode missing, but of the 3 that exists I find FAIL_ON_PROJECT_REPOS is the most appropriate setting, as all the others allow for sneaky issues to stay hidden