This exception is happening on build configuration trying to remove default jar task artifacts from published one. I've set 'jar' task to be always disabled instead and just add shadow jar to artifacts.
original
#KTI-580
also refactor some locally defined tasks to the creation avoidance API
#KT-28824 Fixed