4bf63a9539
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
62 lines
1.6 KiB
Plaintext
Vendored
62 lines
1.6 KiB
Plaintext
Vendored
import java.lang.System;
|
|
|
|
@kotlin.Metadata()
|
|
public final class Outer {
|
|
|
|
public Outer() {
|
|
super();
|
|
}
|
|
|
|
public final void nonAbstract(@org.jetbrains.annotations.NotNull()
|
|
java.lang.String s, int i) {
|
|
}
|
|
|
|
@kotlin.Metadata()
|
|
final class Inner {
|
|
@org.jetbrains.annotations.NotNull()
|
|
private final java.lang.String bar = null;
|
|
@org.jetbrains.annotations.NotNull()
|
|
private final java.lang.String foo = null;
|
|
|
|
public Inner(@org.jetbrains.annotations.NotNull()
|
|
java.lang.String foo, @org.jetbrains.annotations.NotNull()
|
|
java.lang.String bar) {
|
|
super();
|
|
}
|
|
|
|
@org.jetbrains.annotations.NotNull()
|
|
public final java.lang.String getBar() {
|
|
return null;
|
|
}
|
|
|
|
@org.jetbrains.annotations.NotNull()
|
|
public final java.lang.String getFoo() {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@kotlin.Metadata()
|
|
static final class Nested {
|
|
@org.jetbrains.annotations.NotNull()
|
|
private final java.lang.String bar = null;
|
|
@org.jetbrains.annotations.NotNull()
|
|
private final java.lang.String foo = null;
|
|
|
|
public Nested(@org.jetbrains.annotations.NotNull()
|
|
java.lang.String foo, @org.jetbrains.annotations.NotNull()
|
|
java.lang.String bar) {
|
|
super();
|
|
}
|
|
|
|
@org.jetbrains.annotations.NotNull()
|
|
public final java.lang.String getBar() {
|
|
return null;
|
|
}
|
|
|
|
@org.jetbrains.annotations.NotNull()
|
|
public final java.lang.String getFoo() {
|
|
return null;
|
|
}
|
|
}
|
|
}
|