-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't split plugin v dependency cache -- not needed
The plugin cache is necessary and sufficient. The dependency cache could not include plugins, so it was insufficient.
- Loading branch information
Showing
3 changed files
with
44 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
# Generates a CSV of checksums for all maven dependencies in the global cache | ||
# Including their actual SHA 256, and where to verify that online | ||
set -e | ||
|
||
echo "Filename, SHA-1 Checksum, SHA-256 Checksum, Maven Dependency URL, Direct URL to SHA-1, Direct URL to SHA-256" | ||
cd ~/.gradle/caches/modules-2/files-2.1 | ||
for filename in $(find * -type f); do | ||
# filename is of format, with dot-separated org: | ||
# <org>/<dependency-name>/<version>/<sha-1>/<dependency-name>-<version>.<ext> | ||
# friendly URL is of format, with dot-separated org: | ||
# https://mvnrepository.com/artifact/<org>/<dependency-name>/<version> | ||
# direct-to-SHA URL is of format, with slash-separated org: | ||
# https://repo1.maven.org/maven2/<org>/<dependency-name>/<version>/<dependency-name>-<version>.<ext>.sha256 | ||
dotSeparatedOrg=$(echo $filename | cut -f1 -d/) | ||
dependencyName=$(echo $filename | cut -f2 -d/) | ||
version=$(echo $filename | cut -f3 -d/) | ||
ext=$(echo $filename | rev | cut -f1 -d. | rev) | ||
slashSeparatedOrg=$(echo $dotSeparatedOrg | tr "." "/") | ||
friendlyurl="https://mvnrepository.com/artifact/$dotSeparatedOrg/$dependencyName/$version" | ||
directUrl="https://repo1.maven.org/maven2/$slashSeparatedOrg/$dependencyName/$version/$dependencyName-$version.$ext" | ||
directUrlToSha1="$directUrl.sha1" | ||
directUrlToSha256="$directUrl.sha256" | ||
sha1=$(shasum -a 1 $filename | cut -f1 -d" ") | ||
sha256=$(shasum -a 256 $filename | cut -f1 -d" ") | ||
echo "$filename,$sha1,$sha256,$friendlyurl,$directUrlToSha1,$directUrlToSha256" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters