Gradle IC: treat companion object change as class signature change

This commit is contained in:
Alexey Tsvetkov
2016-10-27 16:33:20 +03:00
parent f01a956a8b
commit fc1af746c6
4 changed files with 10 additions and 4 deletions
@@ -190,6 +190,7 @@ private class DifferenceCalculatorForClass(oldData: ProtoMapValue, newData: Prot
ProtoBufClassKind.COMPANION_OBJECT_NAME -> {
if (oldProto.hasCompanionObjectName()) oldProto.companionObjectName.oldToNames()
if (newProto.hasCompanionObjectName()) newProto.companionObjectName.newToNames()
isClassAffected = true
}
ProtoBufClassKind.NESTED_CLASS_NAME_LIST -> {
if (classIsSealed) {
@@ -2,11 +2,11 @@ REMOVED: class ClassWithChangedCompanionObject$FirstName.class
REMOVED: class ClassWithRemovedCompanionObject$Companion.class
ADDED: class ClassWithAddedCompanionObject$Companion.class
ADDED: class ClassWithChangedCompanionObject$SecondName.class
changes in test/ClassWithAddedCompanionObject: MEMBERS
changes in test/ClassWithAddedCompanionObject: CLASS_SIGNATURE, MEMBERS
[Companion]
changes in test/ClassWithChangedCompanionObject: MEMBERS
changes in test/ClassWithChangedCompanionObject: CLASS_SIGNATURE, MEMBERS
[FirstName, SecondName]
changes in test/ClassWithChangedVisibilityForCompanionObject.Companion: CLASS_SIGNATURE
changes in test/ClassWithChangedVisibilityForCompanionObject: NONE
changes in test/ClassWithRemovedCompanionObject: MEMBERS
changes in test/ClassWithRemovedCompanionObject: CLASS_SIGNATURE, MEMBERS
[Companion]
@@ -10,6 +10,7 @@ End of files
Marked as dirty by Kotlin:
src/companionExtension.kt
src/companionReferenceExplicit.kt
src/companionReferenceImplicit.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
@@ -8,16 +8,19 @@ Compiling files:
src/A.kt
End of files
Marked as dirty by Kotlin:
src/useA.kt
src/useAbar.kt
src/useAfoo.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/use/UseAKt.class
out/production/module/use/UseAbarKt.class
out/production/module/use/UseAfooKt.class
End of files
Compiling files:
src/useA.kt
src/useAbar.kt
src/useAfoo.kt
End of files
@@ -34,8 +37,9 @@ Cleaning output files:
End of files
Compiling files:
src/A.kt
src/useA.kt
src/useAbar.kt
src/useAfoo.kt
End of files
Exit code: OK
------------------------------------------
------------------------------------------