Skip to content

Commit

Permalink
Added a new task to resolve dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
smillst authored Jul 29, 2024
1 parent d0fe98d commit 7eb39fa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,26 @@ task installGitHooks(type: Copy, dependsOn: 'setLocalRepo') {
into localRepo + '/hooks'
}

tasks.register('resolveDependencies') {
// Copied from here:
// http://www.jonathanpearlin.com/2014/10/28/gradle_resolve_all_dependencies.html
description 'Resolves all dependencies.'
doLast {
project.rootProject.allprojects.each { subProject ->
subProject.buildscript.configurations.each { configuration ->
if (configuration.canBeResolved) {
configuration.resolve()
}
}
subProject.configurations.each { configuration ->
if (configuration.canBeResolved) {
configuration.resolve()
}
}
}
}
}

spotless {
// Resolve the Spotless plugin dependencies from the buildscript repositories rather than the
// project repositories. That way the spotless plugin does not use the locally built version of
Expand Down
4 changes: 2 additions & 2 deletions checker/bin-devel/clone-related.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ echo "... done: (cd ${AT} && ./.build-without-test.sh)"
## Compile

# Download dependencies, trying a second time if there is a failure.
(TERM=dumb timeout 300 ./gradlew --write-verification-metadata sha256 help --dry-run || \
(sleep 1m && ./gradlew --write-verification-metadata sha256 help --dry-run))
(TERM=dumb timeout 300 ./gradlew resolveDependencies || \
(sleep 1m && ./gradlew resolveDependencies))

echo Exiting checker/bin-devel/clone-related.sh in "$(pwd)"

0 comments on commit 7eb39fa

Please sign in to comment.