@Nullable
  private static ScalaModel createModel(@Nullable Task task) {
    if (!(task instanceof ScalaCompile)) return null;

    ScalaCompile scalaCompile = (ScalaCompile)task;
    ScalaModelImpl scalaModel = new ScalaModelImpl();
    scalaModel.setScalaClasspath(new LinkedHashSet<>(scalaCompile.getScalaClasspath().getFiles()));
    scalaModel.setZincClasspath(new LinkedHashSet<>(scalaCompile.getZincClasspath().getFiles()));
    if (GradleVersionUtil.isCurrentGradleAtLeast("6.4")) {
      scalaModel.setScalaCompilerPlugins(new LinkedHashSet<>(scalaCompile.getScalaCompilerPlugins().getFiles()));
    }
    scalaModel.setScalaCompileOptions(create(scalaCompile.getScalaCompileOptions()));
    scalaModel.setTargetCompatibility(scalaCompile.getTargetCompatibility());
    scalaModel.setSourceCompatibility(scalaCompile.getSourceCompatibility());

    return scalaModel;
  }
@Nullable
  private static ScalaModel createModel(@Nullable Task task)