KT-33052: Fix KAPT stub generation for enums on JDK11
When using JDK11, generating stubs for enums is broken. This commit handles the faulty generation by JDK11 by fully printing enums in custom implementation of tree printing. Test: added JDK11 tests for KAPT stub generation
This commit is contained in:
committed by
Yan Zhulanow
parent
58efa34a33
commit
0cdfe89a26
@@ -605,6 +605,15 @@ public class KotlinTestUtils {
|
||||
return new File(jdk9);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static File getJdk11Home() {
|
||||
String jdk11 = System.getenv("JDK_11");
|
||||
if (jdk11 == null) {
|
||||
throw new AssertionError("Environment variable JDK_11 is not set!");
|
||||
}
|
||||
return new File(jdk11);
|
||||
}
|
||||
|
||||
public static void resolveAllKotlinFiles(KotlinCoreEnvironment environment) throws IOException {
|
||||
List<KotlinSourceRoot> roots = ContentRootsKt.getKotlinSourceRoots(environment.getConfiguration());
|
||||
if (roots.isEmpty()) return;
|
||||
|
||||
Reference in New Issue
Block a user