failOnDuplicateEntries

@get:Input
open val failOnDuplicateEntries: Property<Boolean>

Fails build if the ZIP entries in the shadowed JAR are duplicate.

This is related to setting getDuplicatesStrategy to FAIL but there are some differences:

  • It only checks the entries in the shadowed jar, not the input files.

  • It works with setting getDuplicatesStrategy to any value.

  • Usually used with setting getDuplicatesStrategy to INCLUDE or WARN.

  • It provides a stricter check before the JAR is created.

Defaults to false.