Search in sources :

Example 1 with IdeaJavaLanguageSettings

use of org.gradle.tooling.model.idea.IdeaJavaLanguageSettings in project meghanada-server by mopemope.

the class GradleProject method setCompileTarget.

private void setCompileTarget(final IdeaProject ideaProject) {
    final IdeaJavaLanguageSettings javaLanguageSettings = ideaProject.getJavaLanguageSettings();
    try {
        final String srcLevel = javaLanguageSettings.getLanguageLevel().toString();
        final String targetLevel = javaLanguageSettings.getTargetBytecodeVersion().toString();
        super.compileSource = srcLevel;
        super.compileTarget = targetLevel;
    } catch (UnsupportedMethodException e) {
        log.warn(e.getMessage());
    }
}
Also used : IdeaJavaLanguageSettings(org.gradle.tooling.model.idea.IdeaJavaLanguageSettings) UnsupportedMethodException(org.gradle.tooling.model.UnsupportedMethodException)

Aggregations

UnsupportedMethodException (org.gradle.tooling.model.UnsupportedMethodException)1 IdeaJavaLanguageSettings (org.gradle.tooling.model.idea.IdeaJavaLanguageSettings)1