public static @NotNull Collection<String> getBuildProcessApplicationClasspath() {
    // predictable order
    Set<String> cp = new LinkedHashSet<>();

    addToClassPath(BuildMain.class, cp);
    addToClassPath(ExternalJavacProcess.class, cp);  // intellij.platform.jps.build.javac.rt part
    addToClassPath(JavacReferenceCollector.class, cp);  // jps-javac-extension library

    // intellij.platform.util
    addToClassPath(cp, ClassPathUtil.getUtilClasses());

    ClassPathUtil.addKotlinStdlib(cp);
    addToClassPath(JvmMetadataUtil.class, cp);  // kotlin metadata parsing
    addToClassPath(cp, COMMON_REQUIRED_CLASSES);

    addToClassPath(ClassWriter.class, cp);  // asm
    addToClassPath(ClassVisitor.class, cp);  // asm-commons
    addToClassPath(RuntimeModuleRepository.class, cp); // intellij.platform.runtime.repository
    addToClassPath(JpsModel.class, cp);  // intellij.platform.jps.model
    addToClassPath(JpsModelImpl.class, cp);  // intellij.platform.jps.model.impl
    addToClassPath(JpsProjectLoader.class, cp);  // intellij.platform.jps.model.serialization
    addToClassPath(AlienFormFileException.class, cp);  // intellij.java.guiForms.compiler
    addToClassPath(GridConstraints.class, cp);  // intellij.java.guiForms.rt
    addToClassPath(CellConstraints.class, cp);  // jGoodies-forms
    cp.addAll(getInstrumentationUtilRoots());
    addToClassPath(IXMLBuilder.class, cp);  // nano-xml
    addToClassPath(JavaProjectBuilder.class, cp);  // QDox lightweight java parser
    addToClassPath(Gson.class, cp);  // gson
    addToClassPath(Xxh3.class, cp);
    // caffeine
    addToClassPath(Caffeine.class, cp);

    addToClassPath(cp, ArtifactRepositoryManager.getClassesFromDependencies());
    addToClassPath(Tracer.class, cp); // tracing infrastructure

    try {
      Class<?> cmdLineWrapper = Class.forName("com.intellij.rt.execution.CommandLineWrapper");
      addToClassPath(cmdLineWrapper, cp);  // idea_rt.jar
    }
    catch (Throwable ignored) { }

    return cp;
  }
public static @NotNull Collection<String> getBuildProcessApplicationClasspath()