Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Compile production code
run: |
chmod +x ./gradlew
./gradlew clean classes -PweatherProductionOnly=true --rerun-tasks --no-daemon --stacktrace
./gradlew clean classes -PweatherProductionOnly=true --rerun-tasks --max-workers=2 --no-daemon --stacktrace

- name: Analyze
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
21 changes: 17 additions & 4 deletions gradle/legacy-tools.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,23 @@ new RandomAccessFile(new File(tool.parentFile, 'specialsource-bootstrap.lock'),
if (gradle.startParameter.offline) {
throw new GradleException('The pinned legacy SpecialSource tool is missing or invalid. Run once online to restore it.')
}
def connection = new URL(toolUrl).openConnection()
connection.connectTimeout = 15000
connection.readTimeout = 30000
byte[] downloaded = connection.inputStream.withCloseable { it.bytes }
byte[] downloaded
for (int attempt = 1; attempt <= 3; attempt++) {
def connection = new URL(toolUrl).openConnection()
connection.connectTimeout = 15000
connection.readTimeout = 30000
try {
downloaded = connection.inputStream.withCloseable { it.bytes }
break
} catch (IOException failure) {
int status = connection.responseCode
if (attempt == 3 || (status != 429 && status < 500)) throw failure
logger.lifecycle('Legacy build tool download returned HTTP {}; retrying ({}/3).', status, attempt + 1)
Thread.sleep(1000L * attempt)
} finally {
connection.disconnect()
}
}
if (digest(downloaded) != toolSha256) {
throw new GradleException('The legacy SpecialSource download did not match its pinned SHA-256.')
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ tasks.register('verifyReleaseArtifacts') {

tasks.register('writeReleaseChecksums') {
group = 'verification'
dependsOn tasks.named('verifyReleaseArtifacts')
dependsOn tasks.named('verifyReleaseArtifacts'), tasks.named('writeReleaseChecksum')
def output = layout.buildDirectory.file('release/SHA256SUMS')
outputs.file(output)
inputs.files(releaseFiles.map { names -> names.collect { layout.buildDirectory.file("libs/${it}") } })
Expand Down