mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 16:08:05 +00:00
chore: move the JDT LS components out of plugins/ (#1292)
java-usages, kotlin-bridge and the patched Lombok agent are JDT LS bundles and a Java agent embedded into the app, not OpenIDEA plugins. Move them to java/ so plugins/ holds only plugins, and update the paths that embed or mention them. Also fix the stale build path in the hello fixture and the contributor guide's layout (there is no templates/ directory; starter templates live in the openidea-plugin CLI).
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""Reproducible bundle build: python3 build.py /path/to/jdtls (JDT LS 1.63.0, Java 25; target Java 21)."""
|
||||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import zipfile
|
||||
|
||||
root = pathlib.Path(__file__).resolve().parent
|
||||
plugins = pathlib.Path(sys.argv[1]).resolve() / 'plugins'
|
||||
with tempfile.TemporaryDirectory() as out:
|
||||
subprocess.run(['java', '-cp', str(plugins / '*'),
|
||||
'org.eclipse.jdt.internal.compiler.batch.Main', '-21', '-proc:none',
|
||||
'-classpath', os.pathsep.join(str(p) for p in sorted(plugins.glob('*.jar'))),
|
||||
'-d', out, *[str(p) for p in sorted((root / 'src').rglob('*.java'))]], check=True)
|
||||
with zipfile.ZipFile(root / 'openidea-java-usages.jar', 'w', zipfile.ZIP_DEFLATED) as jar:
|
||||
files = {'META-INF/MANIFEST.MF': root / 'MANIFEST.MF', 'plugin.xml': root / 'plugin.xml'}
|
||||
files.update({str(p.relative_to(out)): p for p in pathlib.Path(out).rglob('*.class')})
|
||||
for name, path in sorted(files.items()):
|
||||
jar.writestr(zipfile.ZipInfo(name, (2026, 1, 1, 0, 0, 0)), path.read_bytes())
|
||||
Reference in New Issue
Block a user