Support import into Eclipse 2022-06

Fix a few issues preventing clean project import into Eclipse 2022-06:

  - `buildSrc` need to limit module imports to prevent clashes
    with those in the gradle API jar.

  - The CLI app needs some classpath changes in order to allow
    compileOnly project dependencies to resolve.

  - `AbstractJpaAutoConfigurationTests` needs some minor refactoring
    in order for generic captures to work with the Eclipse compiler.
This commit is contained in:
Phillip Webb
2022-09-07 15:51:53 -07:00
parent 5470a6b349
commit d4ed2bd47a
3 changed files with 23 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ plugins {
id "java-gradle-plugin"
id "io.spring.javaformat" version "${javaFormatVersion}"
id "checkstyle"
id "eclipse"
}
repositories {
@@ -110,3 +111,10 @@ gradlePlugin {
test {
useJUnitPlatform()
}
eclipse.classpath.file.whenMerged {
def jreEntry = entries.find { it.path.contains("org.eclipse.jdt.launching.JRE_CONTAINER") }
jreEntry.entryAttributes['module'] = 'true'
jreEntry.entryAttributes['limit-modules'] = 'java.base'
}