Improved artifact exclusion in Gradle build script.