[GRADLE-2224] Tooling API: Use language level settings defined at the idea plugin during exposing the project structure via the API Created: 12/Apr/12  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-rc-1
Fix Version/s: None

Type: Bug
Reporter: Denis Zhdanov Assignee: Unassigned
Resolution: Won't Fix Votes: 2


 Description   

Project structure info in a form of the IdeaProject should respect language level settings defined at the gradle script

For example, I expect IdeaProject.getLanguageLevel() to return 1.7 when I have the following at the build.gradle:

    idea {
        project {
            languageLeve = '1.7'
        }
    }

P.S. Please note that there a dedicated ticket about the language level from the java plugin deduction (GRADLE-2198). I think it's worth to behave as following then:

  1. Use the language level defined at the 'idea' plugin (if any);
  2. Fall back to the 'java' plugin settings otherwise:
  3. Use default language level if non of the above matches;


 Comments   
Comment by Szczepan Faber [ 24/Apr/12 ]

Hey, you have a typo in the 'languageLevel'. This feature works - I cannot reproduce the error behavior.

Feel free to reopen if necessary

Comment by Denis Zhdanov [ 02/May/12 ]

Sorry but I still observe the problem even after the typo correction.

I've added corresponding settings to the build.gradle file located at the $GRADLE_HOME/samples/java/multiproject. It looks as following now:

build.gradle
subprojects {
    apply plugin: 'java'
    apply plugin: 'idea'

    idea {
        project {
            languageLevel = '1.7'
        }
    }

    repositories {
       mavenCentral()
    }

    dependencies {
        compile 'org.springframework:spring-core:3.1.0.RELEASE'
        compile 'commons-lang:commons-lang:2.4'
        testCompile 'junit:junit:4.8.2'
    }

    version = '1.0'

    jar {
        manifest.attributes provider: 'gradle'
    }
}

The tooling api returns language level 1.6 for the project. Please reopen the ticket.

Comment by Szczepan Faber [ 07/May/12 ]

I see what you mean. I think we need to properly handle the language level settings per module first. That should resolve the issue.

Reopening...

Comment by Roman Janusz [ 12/Apr/13 ]

Any progress on this issue?

As an additional information, I was debugging this a little and it seems that in subprojects configuration idea.project is null (while idea.module is ok).

Comment by Szczepan Faber [ 12/Apr/13 ]

Hey Roman,

idea.project only lives on the root project (maybe it should be better documented).

No progress so far on this issue - we're focusing elsewhere recently.

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 12:16:07 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.