Checksum

JReleaser calculates checksums for all input files and artifacts. These checksums are grouped into a single file named checksums.txt which in turn may be signed and uploaded to a release.

Use the following options to customize how checksums are handled:

Legend:

  • required

  • optional

  • may use environment variable

  • accepts Name Templates

  • YAML

  • TOML

  • JSON

  • Maven

  • Gradle

# 
checksum:
  # The name of the grouping checksums file.
  # Defaults to `checksums.txt`.
  #  
  name: '{{projectName}}-{{projectVersion}}_checksums.txt'

  # Algorithm to be used.
  # Valid values are [`MD2`, `MD5`, `SHA1`, `SHA256`, `SHA384`, `SHA512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
  # Default value is `SHA256`.
  # `SHA256` is always configured.
  # 
  algorithms:
    - MD5
    - SHA256

  # Uploads individual checksum files.
  # Defaults to `false`.
  # 
  individual: true
# 
[checksum]
  # The name of the grouping checksums file.
  # Defaults to `checksums.txt`.
  #  
  name = "{{projectName}}-{{projectVersion}}_checksums.txt"

  # Algorithm to be used.
  # Valid values are [`MD2`, `MD5`, `SHA1`, `SHA256`, `SHA384`, `SHA512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
  # Default value is `SHA256`.
  # `SHA256` is always configured.
  # 
  algorithms = ["MD5", "SHA256"]

  # Uploads individual checksum files.
  # Defaults to `false`.
  # 
  individual = true
{
  // 
  "checksum": {

    // The name of the grouping checksums file.
    // Defaults to `checksums.txt`.
    //  
    "name": "{{projectName}}-{{projectVersion}}_checksums.txt",

    // Algorithm to be used.
    // Valid values are [`MD2`, `MD5`, `SHA1`, `SHA256`, `SHA384`, `SHA512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
    // Default value is `SHA256`.
    // `SHA256` is always configured.
    // 
    "algorithms": [
      "MD5",
      "SHA256"
    ],

    // Uploads individual checksum files.
    // Defaults to `false`.
    // 
    "individual": true
  }
}
<jreleaser>
  <!--
    
  -->
  <checksum>

    <!--
      The name of the grouping checksums file.
      Defaults to `checksums.txt`.
       
    -->
    <name>{{projectName}}-{{projectVersion}}_checksums.txt</name>

    <!--
      Algorithm to be used.
      Valid values are [`MD2`, `MD5`, `SHA1`, `SHA256`, `SHA384`, `SHA512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
      Default value is `SHA256`.
      `SHA256` is always configured.
      
    -->
    <algorithms>
        <algorithm>MD5</algorithm>
        <algorithm>SHA256</algorithm>
    </algorithms>

    <!--
      Uploads individual checksum files.
      Defaults to `false`.
      
    -->
    <individual>true</individual>
  </checksum>
</jreleaser>
jreleaser {
  // 
  checksum {
    // The name of the grouping checksums file.
    // Defaults to `checksums.txt`.
    //  
    name = '{{projectName}}-{{projectVersion}}_checksums.txt'

    // Algorithm to be used.
    // Valid values are [`MD2`, `MD5`, `SHA1`, `SHA256`, `SHA384`, `SHA512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
    // Default value is `SHA256`.
    // `SHA256` is always configured.
    // 
    algorithm('MD5')
    algorithm('SHA256')

    // Uploads individual checksum files.
    // Defaults to `false`.
    // 
    individual = true
  }
}