title: Gradle 7 task ':distTar' is a duplicate but no duplicate handling strategy has been set
body: <p>I have upgraded from gradle 5 to gradle 7 and now receive the following error. ':distTar' is a duplicate but no duplicate handling strategy has been set.</p>
  <p>In the build.gradle file I originally was receiving the error : &quot;Execution failed for task ':bootJar'. is a duplicate but no duplicate handling strategy has been set.&quot; To make this error go away I used the following in my build.gradle :</p>
  <pre><code>tasks.withType(Jar).all {
      duplicatesStrategy 'exclude'
  }
  </code></pre>
  <p>This then gives me the following error that I am asking for help on. The task distTar for me I believe is coming from my plugin 'application', but I can't find a way to reference that task to add a duplicatesStrategy to resolve the issue.</p>
  <p>Any help to solve this error is appreciated!
  Thanks!</p>