File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -607,11 +607,13 @@ tasks.register('markGeneratedEqualsHashCode') {
607607 def jacocoDir = layout. buildDirectory. dir(' classes-jacoco/java/main' )
608608
609609 inputs. dir(originalDir)
610+ inputs. property(" generatedAnnotationTaskVersion" , 2 )
610611 outputs. dir(jacocoDir)
611612
612613 doLast {
613614 def src = originalDir. get(). asFile
614615 def dest = jacocoDir. get(). asFile
616+ project. delete(dest)
615617 if (! src. exists()) return
616618
617619 // Copy all class files to a separate directory for JaCoCo
@@ -635,8 +637,10 @@ tasks.register('markGeneratedEqualsHashCode') {
635637 if (method. invisibleAnnotations == null ) {
636638 method. invisibleAnnotations = []
637639 }
638- method. invisibleAnnotations. add(new org.objectweb.asm.tree.AnnotationNode (ANNOTATION ))
639- modified = true
640+ if (! method. invisibleAnnotations. any { it. desc == ANNOTATION }) {
641+ method. invisibleAnnotations. add(new org.objectweb.asm.tree.AnnotationNode (ANNOTATION ))
642+ modified = true
643+ }
640644 }
641645 }
642646
@@ -799,4 +803,3 @@ tasks.withType(GenerateModuleMetadata) {
799803}
800804
801805
802-
You can’t perform that action at this time.
0 commit comments