<commit_before>
This spec defines a number of features to improve the developer experience using Gradle from the IDE. It covers changes in Gradle to improve those features
that directly affect the IDE user experience. This includes the tooling API and tooling models, the Gradle daemon, and the Gradle IDE plugins
(i.e. the plugins that run inside Gradle to provide the IDE models).

Tooling API stories that are not related directly to the IDE experience should go in the `tooling-api-improvements.md` spec. 

# Implementation plan

## Feature - Expose source and target platforms of JVM language projects 

### Story - Expose Java source level for Java projects to Eclipse

- For `EclipseProject`, add details of the Java source level:
    - Builders for the project.
    - Natures for the project.
    - JDT language compliance level.
- For `GradleProject`, add details of the Java source level:
    - Java language version.
- Improve the Java source level detection. Source level should be based on the source compatibility of the project.
- For older Gradle versions: 
    - TBD - reasonable defaults for Java language version

### Story - Expose target JDK for Java projects to Eclipse

- For `EclipseProject`, add details of the target JVM:
    - JRE name
    - JRE Java version
    - JRE install directory
- For `GradleProject`, add details of the target JVM:
    - Java version
    - Install directory
- Improve the target SDK detection. Name and version should be based on the target compatibility of the project. 
- For older Gradle versions: 
    - TBD - reasonable defaults for Java language version

### Story - Expose Java source level for Java projects to IDEA

For IDEA, need to choose between setting level on all modules vs setting level on project and inheriting.

- For `IdeaModule`, add details of the Java source level: 
    - Inherit from project?
    - Language level.
- Improve the Java source level detection. Source level should be based on the source compatibility of the project.
- IDEA project language level should be the highest version used by the modules.
- Include the new details in the files generated by `gradle idea`.
- For older Gradle versions:
    - Default inherit from project to `true`.

### Story - Expose target JDK for Java projects to IDEA

- For `IdeaModule`, add details of the module SDK:
    - Inherit from project?
    - SDK name
    - Java version
    - Installation directory
- For `IdeaProject`, add more details to the IDEA project SDK:
    - Java version
    - Installation directory
- Improve the target SDK detection. Name and version should be based on the target compatibility of the project. 
- IDEA Project SDK should be the highest version used by the modules.
- Include the appropriate details in the files generated by `gradle idea`.
- For older Gradle versions:
    - Default inherit from project to `true`.
    - TBD - reasonable defaults for other versions? 

### Story - Expose Groovy components to the IDE

TBD

## Feature - Tooling API parity with command-line for task visualisation and execution

This feature exposes via the tooling API some task execution and reporting features that are currently available on the command-line.

- Task selection by name, where I can run `gradle test` and this will find and execute all tasks with name `test` in the current project and its subprojects.<commit_msg>split up eclipse tapi stories;<commit_after>
This spec defines a number of features to improve the developer experience using Gradle from the IDE. It covers changes in Gradle to improve those features
that directly affect the IDE user experience. This includes the tooling API and tooling models, the Gradle daemon, and the Gradle IDE plugins
(i.e. the plugins that run inside Gradle to provide the IDE models).

Tooling API stories that are not related directly to the IDE experience should go in the `tooling-api-improvements.md` spec.

# Implementation plan

## Feature - Expose source and target platforms of JVM language projects

### Story - Expose Java source level for Java projects to Eclipse

#### Implementation

- For `EclipseProject`, add details of the Java source level:
    - JDT language compliance level.
- Improve the Java source level detection. Source level should be based on the source compatibility of the project.
    - consume this information from the eclipse plugin configuration if provided (`eclipse.jdt.sourceCompatibility`)
- For older Gradle versions:
    - TBD - reasonable defaults for Java language version


### Story - Expose target JDK for Java projects to Eclipse

#### Implementation
- For `EclipseProject`, add details of the target JVM:
    - JDK name
    - JDK Java version
    - JDK install directory
- Improve the target SDK detection. Name and version should be based on the target compatibility of the project.
    - consume this information from the eclipse plugin configuration if provided (`eclipse.jdt.targetCompatibility`)

- For older Gradle versions:
    - TBD - reasonable defaults for Java language version

### Story - Introduce JavaProject

#### Implementation

- add new `JavaProject` to model IDE agnostic Java Projects
- add details about Java Source level to the `JavaModel`
    - should be based on projects `sourceCompatibility` level
- add details of the target JVM:
    - should be based on projects `targetCompatibility` level
    - Java version
    - Install directory

- For older Gradle versions:
    - TBD - reasonable defaults for Java language version


### Story - Expose more Eclipse settings for the projects

#### Implementation

- Expose Eclipse natures via `EclipseProject`
    - consume information from eclipse plugin configuration
    - declare reasonable defaults for java projects

- Expose Eclipse buildSpec (`builders`) via `EclipseProject`
    - consume information from eclipse plugin configuration
    - declare reasonable defaults for java projects

- For older Gradle versions:
    - TBD - reasonable defaults (could be empty list or null; contract needs to be defined)

#### Test coverage

### Story - Expose Java source level for Java projects to IDEA

For IDEA, need to choose between setting level on all modules vs setting level on project and inheriting.

- For `IdeaModule`, add details of the Java source level:
    - Inherit from project?
    - Language level.
- Improve the Java source level detection. Source level should be based on the source compatibility of the project.
- IDEA project language level should be the highest version used by the modules.
- Include the new details in the files generated by `gradle idea`.
- For older Gradle versions:
    - Default inherit from project to `true`.

### Story - Expose target JDK for Java projects to IDEA

- For `IdeaModule`, add details of the module SDK:
    - Inherit from project?
    - SDK name
    - Java version
    - Installation directory
- For `IdeaProject`, add more details to the IDEA project SDK:
    - Java version
    - Installation directory
- Improve the target SDK detection. Name and version should be based on the target compatibility of the project.
- IDEA Project SDK should be the highest version used by the modules.
- Include the appropriate details in the files generated by `gradle idea`.
- For older Gradle versions:
    - Default inherit from project to `true`.
    - TBD - reasonable defaults for other versions?

### Story - Expose Groovy components to the IDE

TBD

## Feature - Tooling API parity with command-line for task visualisation and execution

This feature exposes via the tooling API some task execution and reporting features that are currently available on the command-line.

- Task selection by name, where I can run `gradle test` and this will find and execute all tasks with name `test` in the current project and its subprojects.
{'fraction_non_alphanumeric': 0.05019206145966709, 'fraction_numerical': 0.0, 'mean_word_length': 3.6438763376932224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5299790', 'n_tokens_mistral': 1940, 'n_tokens_neox': 1829, 'n_words': 1092}