mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
jps: added method to get languageLevel for module
This commit is contained in:
@@ -24,6 +24,8 @@ class Module extends LazyInitializeableObject implements ClasspathItem {//}, Com
|
||||
Map<String, String> sourceRootPrefixes = [:]
|
||||
Map<String, Library> libraries = [:]
|
||||
|
||||
String languageLevel
|
||||
|
||||
/*int compareTo(Object o) {
|
||||
if (o instanceof Module) {
|
||||
((Module) o).name.compareTo(name);
|
||||
|
||||
@@ -69,6 +69,10 @@ class ModuleChunk extends DagNode<Module> {
|
||||
return representativeModule().project
|
||||
}
|
||||
|
||||
def String getLanguageLevel() {
|
||||
return representativeModule().languageLevel
|
||||
}
|
||||
|
||||
public Module representativeModule() {
|
||||
return elements.iterator().next()
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ public class IdeaProjectLoader {
|
||||
|
||||
configuration.javacOptions.putAll(loadOptions(getComponent(root, "JavacSettings")))
|
||||
|
||||
def annotationProcessingTag = componentTag.annotationProcessing
|
||||
def annotationProcessingTag = componentTag?.annotationProcessing
|
||||
if (annotationProcessingTag != null) {
|
||||
configuration.annotationProcessing.enabled = parseBoolean(annotationProcessingTag."@enabled", false)
|
||||
configuration.annotationProcessing.obtainProcessorsFromClasspath = parseBoolean(annotationProcessingTag."@useClasspath", true)
|
||||
@@ -471,9 +471,7 @@ public class IdeaProjectLoader {
|
||||
languageLevel = projectLanguageLevel
|
||||
}
|
||||
if (languageLevel != null) {
|
||||
def ll = convertLanguageLevel(languageLevel)
|
||||
currentModule["sourceLevel"] = ll
|
||||
currentModule["targetLevel"] = ll
|
||||
currentModule.languageLevel = convertLanguageLevel(languageLevel)
|
||||
}
|
||||
|
||||
if (srcFolderExists) {
|
||||
|
||||
@@ -27,8 +27,8 @@ class JavacBuilder implements ModuleBuilder, ModuleCycleBuilder {
|
||||
def doBuildModule(ModuleChunk module, ModuleBuildState state, ProjectBuilder projectBuilder) {
|
||||
if (state.sourceRoots.isEmpty()) return;
|
||||
|
||||
String sourceLevel = module["sourceLevel"]
|
||||
String targetLevel = module["targetLevel"]
|
||||
String sourceLevel = module.languageLevel
|
||||
String targetLevel = module.languageLevel
|
||||
String customArgs = module["javac_args"]; // it seems javac_args property is not set, can we drop it?
|
||||
if (projectBuilder.useInProcessJavac) {
|
||||
String version = System.getProperty("java.version")
|
||||
|
||||
Reference in New Issue
Block a user