Search in sources :

Example 1 with ScalaModelData

use of org.jetbrains.plugins.gradle.model.data.ScalaModelData in project intellij-community by JetBrains.

the class ScalaGradleProjectResolverExtension method populateModuleExtraModels.

@Override
public void populateModuleExtraModels(@NotNull IdeaModule gradleModule, @NotNull DataNode<ModuleData> ideModule) {
    ScalaModel scalaModel = resolverCtx.getExtraProject(gradleModule, ScalaModel.class);
    if (scalaModel != null) {
        ScalaModelData scalaModelData = create(scalaModel);
        ideModule.createChild(ScalaModelData.KEY, scalaModelData);
    }
    nextResolver.populateModuleExtraModels(gradleModule, ideModule);
}
Also used : ScalaModel(org.jetbrains.plugins.gradle.model.scala.ScalaModel) ScalaModelData(org.jetbrains.plugins.gradle.model.data.ScalaModelData)

Example 2 with ScalaModelData

use of org.jetbrains.plugins.gradle.model.data.ScalaModelData in project intellij-community by JetBrains.

the class ScalaGradleProjectResolverExtension method create.

@NotNull
private static ScalaModelData create(@NotNull ScalaModel scalaModel) {
    ScalaModelData scalaModelData = new ScalaModelData(GradleConstants.SYSTEM_ID);
    scalaModelData.setZincClasspath(scalaModel.getZincClasspath());
    scalaModelData.setScalaClasspath(scalaModel.getScalaClasspath());
    scalaModelData.setScalaCompileOptions(create((scalaModel.getScalaCompileOptions())));
    scalaModelData.setSourceCompatibility(scalaModel.getSourceCompatibility());
    scalaModelData.setTargetCompatibility(scalaModel.getTargetCompatibility());
    return scalaModelData;
}
Also used : ScalaModelData(org.jetbrains.plugins.gradle.model.data.ScalaModelData) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

ScalaModelData (org.jetbrains.plugins.gradle.model.data.ScalaModelData)2 NotNull (org.jetbrains.annotations.NotNull)1 ScalaModel (org.jetbrains.plugins.gradle.model.scala.ScalaModel)1