-
-
Notifications
You must be signed in to change notification settings - Fork 123
Description
The gradle-node-plugin adds an ad-hoc ivy repository to download the node.js artifact. Due to how gradle artifact resolution works, gradle will try all repositories in the order they are defined when trying to resolve the node.js artifact.
In our case, we have a single internally hosted repository that proxies several public repositores as well as internal repositories. The request to our repository, that will always fail anyway, times out before returning a not found response, causing the grade build to occassionally fail.
Since the node.js artifact is unlikely to be in any of the project's repositories, and if it was, then baseDistUrl could be set to null to prevent the addition of the ad-hoc repository, it would make sense to specify the repository as exclusivly containing the org.nodejs:node artifact.
Similar configuration can be achieved in the build.gradle:
repositories{
exclusiveContent {
forRepository {
ivy {
name = "Node.js"
url = "https://nodejs.org/dist/"
patternLayout {
artifact "v[revision]/[artifact](-v[revision]-[classifier]).[ext]"
}
metadataSources {
artifact()
}
}
}
filter {
includeModule "org.nodejs", "node"
}
}
}