Skip to content

Commit

Permalink
Create checksum build task
Browse files Browse the repository at this point in the history
  • Loading branch information
tduva committed Oct 13, 2020
1 parent ed612a1 commit af97784
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import java.util.regex.Matcher

plugins {
id "com.github.johnrengelman.shadow" version "6.0.0"
id "org.gradle.crypto.checksum" version "1.1.0"
id "java"
}

Expand Down Expand Up @@ -242,3 +243,18 @@ task innosetupStandalone(type: Exec, group: 'build') {
task releaseWinSetups(group: 'build') {
dependsOn releaseWindows, innosetup, innosetupStandalone, build
}

//---------
// Checksum
//---------

import org.gradle.crypto.checksum.Checksum

task createChecksums(type: Checksum) {
files = layout.files { releasesDir.listFiles() }.filter { File f ->
f.name.endsWith(".exe") || f.name.endsWith(".zip")
}
outputDir = new File(releasesDir, "v"+version)
algorithm = Checksum.Algorithm.SHA256
}

0 comments on commit af97784

Please sign in to comment.