Files
kotlin-fork/plugins/kapt3/kapt3-compiler/testData/converter/interfaceImplementation.txt
T
Hung Nguyen 4bf63a9539 Sort class members to ensure deterministic builds
Class methods and fields are currently sorted at serialization (see
DescriptorSerializer.sort) and at deserialization (see
DeserializedMemberScope.OptimizedImplementation#addMembers). Therefore,
the contents of the generated stub files are sorted in incremental
builds but not in clean builds.

The consequence is that the contents of the generated stub files may not
be consistent across a clean build and an incremental build, making the
build non-deterministic and dependent tasks run unnecessarily (see
KT-40882).

To work around that, this commit sorts class methods and fields when
outputting stub files.

Bug: KT-40882 (there are actually 2 issues in here; this commit fixes
     the first one)
Test: New DeterministicBuildIT + Updated existing test expectation files
2020-11-25 20:51:09 +03:00

35 lines
714 B
Plaintext
Vendored

import java.lang.System;
@kotlin.Metadata()
public abstract interface Named {
@org.jetbrains.annotations.Nullable()
public abstract java.lang.String getName();
}
////////////////////
import java.lang.System;
@kotlin.Metadata()
public final class Product2 implements Named {
@org.jetbrains.annotations.Nullable()
private java.lang.String name;
public Product2(@org.jetbrains.annotations.NotNull()
java.lang.String otherName) {
super();
}
@org.jetbrains.annotations.Nullable()
@java.lang.Override()
public java.lang.String getName() {
return null;
}
public void setName(@org.jetbrains.annotations.Nullable()
java.lang.String p0) {
}
}