From 2b78a9cbc81f9b431e1abdaddd0820fe78513126 Mon Sep 17 00:00:00 2001 From: Alex Abashev Date: Thu, 10 Sep 2026 22:25:57 +0300 Subject: [PATCH 1/2] Update eclipse configuration --- eclipse_plugin/build.gradle | 41 ++++++++++++------- .../src/main/resources/META-INF/MANIFEST.MF | 5 --- gradle/libs.versions.toml | 6 +++ 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/eclipse_plugin/build.gradle b/eclipse_plugin/build.gradle index 279e6bfd9..43c461091 100644 --- a/eclipse_plugin/build.gradle +++ b/eclipse_plugin/build.gradle @@ -14,32 +14,45 @@ plugins { id 'java-library' - id 'dev.equo.p2deps' version '1.7.8' -} - -p2deps { - into 'compileOnly', { - p2repo 'https://download.eclipse.org/releases/2020-09/202009161000/' - - install 'org.eclipse.jdt.core' - } } dependencies { + // Was dev.equo.p2deps resolving these from an Eclipse p2 repository at configuration time: + // a network fetch on every configuration, and a parse of the metadata index of an entire + // Eclipse release — which now exceeds the JDK's JAXP entity-size limit and fails the build. + // Same bundles, from Maven Central, resolved like every other dependency. compileOnly because + // the host IDE provides them at runtime; MANIFEST.MF imports the packages without version + // ranges, so the versions here only have to satisfy the compiler. + compileOnly libs.eclipse.jdtCore + compileOnly libs.eclipse.jfaceText + compileOnly libs.eclipse.text + implementation project(':palantir-java-format') implementation libs.jsr305 } +// The dependencies embedded in the plugin jar. Named once, so the manifest can list exactly what +// was packaged rather than a guess at what the file names will be. +def embeddedLibs = configurations.runtimeClasspath.filter { file -> + ['functionaljava', 'guava', 'palantir'].any { file.name.startsWith(it) } +} + tasks.named("jar", Jar) { archiveBaseName = 'palantir-java-format-eclipse-plugin' + manifest { from 'src/main/resources/META-INF/MANIFEST.MF' + // Generated, not hardcoded. There used to be a rename() stripping versions off the + // embedded jars so their names would match a fixed Bundle-ClassPath, but its pattern only + // matched plain versions: on any build whose version comes from `git describe` + // (2.97.0-26-g9da6ae7.dirty) the rename silently did nothing and the manifest pointed at + // files that were not in the archive, so Eclipse could not load the plugin. + attributes('Bundle-ClassPath': embeddedLibs.elements.map { files -> + (['.'] + files.collect { "lib/${it.asFile.name}" }).join(',') + }) } - // We embed some dependencies into the JAR file - from(configurations.runtimeClasspath) { + + from(embeddedLibs) { into 'lib' - include('functionaljava*', 'guava*', 'palantir*') - // The libraries are listed without a version in the manifest - rename('(.*)-[0-9b.]+(\\.dirty|-jre)?\\.jar', '$1.jar') } } diff --git a/eclipse_plugin/src/main/resources/META-INF/MANIFEST.MF b/eclipse_plugin/src/main/resources/META-INF/MANIFEST.MF index 1ff9df2dd..f705f5a40 100644 --- a/eclipse_plugin/src/main/resources/META-INF/MANIFEST.MF +++ b/eclipse_plugin/src/main/resources/META-INF/MANIFEST.MF @@ -8,8 +8,3 @@ Import-Package: org.eclipse.jdt.core.dom, org.eclipse.jdt.core.formatter, org.eclipse.jface.text, org.eclipse.text.edits -Bundle-ClassPath: ., - lib/functionaljava.jar, - lib/guava.jar, - lib/palantir-java-format.jar, - lib/palantir-java-format-spi.jar diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 02d69fb90..ab6a5a97e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,6 +3,12 @@ # updates it, which it could not do for versions.props. [libraries] +# Eclipse bundles the plugin compiles against. compileOnly: at runtime the host IDE +# provides them, and META-INF/MANIFEST.MF imports the packages without version ranges. +# Versions here match Eclipse 2020-09, which is what the p2 repository used to resolve. +eclipse-jdtCore = { module = "org.eclipse.jdt:org.eclipse.jdt.core", version = "3.23.0" } +eclipse-jfaceText = { module = "org.eclipse.platform:org.eclipse.jface.text", version = "3.16.300" } +eclipse-text = { module = "org.eclipse.platform:org.eclipse.text", version = "3.10.200" } jetbrainsAnnotations = { module = "org.jetbrains:annotations", version = "26.1.0" } # A platform, not a dependency: plugins (baseline) inject versionless JUnit artifacts such as # junit-platform-launcher, and versions.props used to supply their versions. From 5b1c7862650cc5724f4e1c971e2d3d2d0b3d290f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Sep 2026 19:28:00 +0000 Subject: [PATCH 2/2] Bump com.palantir.gradle.guide:gradle-guide from 1.27.0 to 1.32.0 Bumps [com.palantir.gradle.guide:gradle-guide](https://github.com/palantir/gradle-guide) from 1.27.0 to 1.32.0. - [Release notes](https://github.com/palantir/gradle-guide/releases) - [Commits](https://github.com/palantir/gradle-guide/compare/1.27.0...1.32.0) --- updated-dependencies: - dependency-name: com.palantir.gradle.guide:gradle-guide dependency-version: 1.32.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2c1594da7..a68d2d004 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { classpath 'com.palantir.baseline:gradle-baseline-java:7.9.0' classpath 'com.palantir.gradle.failure-reports:gradle-failure-reports:1.21.0' classpath 'com.palantir.gradle.gitversion:gradle-git-version:5.1.0' - classpath 'com.palantir.gradle.guide:gradle-guide:1.27.0' + classpath 'com.palantir.gradle.guide:gradle-guide:1.32.0' classpath 'com.palantir.gradle.idea-configuration:gradle-idea-configuration:0.11.0' classpath 'com.palantir.gradle.idea-language-injector:gradle-idea-language-injector:0.5.0' classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.97.0'