add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) {
addArtifactPattern("$projectDir/dist/${project.baseName}-${project.version}/[artifact].[ext]")
}
поменять на ivy {
artifactPattern '$projectDir/dist/${project.baseName}-${project.version}/[artifact].[ext]'
}