Skip to content

Commit 1cab000

Browse files
1lckclaude
andauthored
feat!: 使用用户自装的 JDT LS,插件包不再附带语言服务器和 JDK (#18)
* feat!: use the user's own JDT LS instead of bundling it Java Support no longer ships Eclipse JDT LS or a JDK. The backend now locates the user's JDT LS installation (setting, JDTLS_HOME, jdtls on PATH, Homebrew/Linuxbrew/mason/Scoop, VS Code redhat.java) and answers the launch with the new jdtls-runtime tool, refusing a JDK older than 21. The package keeps only Lombok, java-debug and java-test extensions, shrinking from ~250 MiB to ~11 MiB. The JDT decompiler patch is dropped. BREAKING CHANGE: users must install JDT LS and a JDK 21+ themselves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: use actions/setup-java@v5 setup-java v4 is deprecated and no longer receives updates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 84a8566 commit 1cab000

33 files changed

Lines changed: 1446 additions & 1212 deletions

‎.github/workflows/ci.yml‎

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ jobs:
6565
- name: Restore verified third-party downloads
6666
uses: actions/cache@v4
6767
with:
68-
path: |
69-
.artifacts/jdtls-downloads
70-
.artifacts/jdk-downloads
68+
path: .artifacts/jdtls-downloads
7169
key: third-party-${{ hashFiles('third_party/*/manifest.json') }}
7270
- name: Build, verify and archive both architectures
7371
run: |
@@ -76,7 +74,13 @@ jobs:
7674
package=$(scripts/build-package.sh --arch "$arch")
7775
scripts/archive-package.sh --package "$package" --arch "$arch"
7876
done
79-
- name: Verify native compiler settings and JARs with JDT
77+
# The package ships no JDK; the integration tests run the tested JDT LS
78+
# release on this one, as a user's JDK 21+ would.
79+
- uses: actions/setup-java@v5
80+
with:
81+
distribution: temurin
82+
java-version: "21"
83+
- name: Verify native compiler settings and JARs with the user's JDT LS
8084
run: |
8185
package=".artifacts/package/$(uname -m)/io.github.lithe-idea.java-support"
8286
node scripts/compiler/test-live.mjs "$package"
@@ -118,18 +122,22 @@ jobs:
118122
node-version: 22
119123
- name: Install packaging tools
120124
run: sudo apt-get update && sudo apt-get install -y zsh zip unzip
125+
# The package ships no JDK; the integration tests run the tested JDT LS
126+
# release on this one, as a user's JDK 21+ would.
127+
- uses: actions/setup-java@v5
128+
with:
129+
distribution: temurin
130+
java-version: "21"
121131
- name: Restore checksum-verified downloads
122132
uses: actions/cache@v4
123133
with:
124-
path: |
125-
.artifacts/jdtls-downloads
126-
.artifacts/jdk-downloads
134+
path: .artifacts/jdtls-downloads
127135
key: linux-${{ matrix.arch }}-${{ hashFiles('third_party/*/manifest.json') }}
128136
- name: Test the native backend
129137
run: cargo test --workspace --locked
130138
- name: Build and verify the archive
131139
run: node scripts/package/build-linux.mjs "${{ matrix.arch }}"
132-
- name: Start the packaged backend and language server
140+
- name: Start the packaged backend and the user's language server
133141
run: node scripts/package/smoke-linux.mjs dist/*-linux-${{ matrix.arch }}.zip
134142
- uses: actions/upload-artifact@v4
135143
with:

‎.github/workflows/release.yml‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,18 +171,22 @@ jobs:
171171
node-version: 22
172172
- name: Install packaging tools
173173
run: sudo apt-get update && sudo apt-get install -y zsh zip unzip
174+
# The package ships no JDK; the integration tests run the tested JDT LS
175+
# release on this one, as a user's JDK 21+ would.
176+
- uses: actions/setup-java@v5
177+
with:
178+
distribution: temurin
179+
java-version: "21"
174180
- name: Restore checksum-verified downloads
175181
uses: actions/cache@v4
176182
with:
177-
path: |
178-
.artifacts/jdtls-downloads
179-
.artifacts/jdk-downloads
183+
path: .artifacts/jdtls-downloads
180184
key: linux-${{ matrix.arch }}-${{ hashFiles('third_party/*/manifest.json') }}
181185
- name: Test the native backend
182186
run: cargo test --workspace --locked
183187
- name: Build and verify the archive
184188
run: node scripts/package/build-linux.mjs "${{ matrix.arch }}"
185-
- name: Start the packaged backend and language server
189+
- name: Start the packaged backend and the user's language server
186190
run: node scripts/package/smoke-linux.mjs dist/*-linux-${{ matrix.arch }}.zip
187191
- uses: actions/upload-artifact@v4
188192
with:

‎MIGRATION.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# 迁移说明:Java 逻辑从 Lithe 主仓库移到本仓库
22

3+
> 3.0.0 起插件包不再附带 JDT LS 和 JDK,改用用户自己的安装(`backend/src/jdtls.rs`);`scripts/prepare-jdk.sh`、
4+
> `third_party/jdk/` 和 JDT 反编译补丁已删除。下文的打包与资源条目是迁移时的历史记录。
5+
36
本文是 Java Support 插件(`io.github.lithe-idea.java-support`)从 Lithe 主仓库拆分出来的移植账本,回答四个问题:
47

58
1. 主仓库里的每个 Java 相关文件或符号,现在在本仓库的哪里,状态是什么。

‎NOTICE‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ is downloaded at build time from pinned sources and verified by SHA-256 (see
88
third_party/). Each component keeps its own license, and the license text is
99
copied into the package next to the component:
1010

11-
Eclipse JDT Language Server Eclipse Public License 2.0
12-
https://download.eclipse.org/jdtls/
1311
Project Lombok MIT License
1412
https://projectlombok.org/
1513
Microsoft java-debug Eclipse Public License 1.0
1614
(vscode-java-debug) https://github.com/microsoft/java-debug
1715
Microsoft vscode-java-test MIT License
1816
(JUnit runner and plugin) https://github.com/microsoft/vscode-java-test
19-
Eclipse Temurin JDK GNU General Public License v2 with the
20-
Classpath Exception
21-
https://adoptium.net/
17+
18+
The package does not include the Eclipse JDT Language Server or a Java
19+
runtime. The plugin runs the JDT LS installation and the JDK the user installs
20+
(https://download.eclipse.org/jdtls/, Eclipse Public License 2.0).
2221

2322
The icons java.svg and java_dark.svg in
2423
io.github.lithe-idea.java-support/icons/ come from the JetBrains IntelliJ Platform

0 commit comments

Comments
 (0)