From c475eb379b052ff59339086ebdc0b00b4b728c85 Mon Sep 17 00:00:00 2001 From: Alex <apuret@takima.fr> Date: Thu, 9 Dec 2021 18:38:13 +0100 Subject: [PATCH] feat: add own building of java pack --- deadlock-plugins/java/.gitignore | 1 + deadlock-plugins/java/README.md | 31 +++++++++++++++++++++++++ deadlock-plugins/java/build.sh | 9 +++++++ deadlock-plugins/java/install.sh | 21 +++++++++++++++++ deadlock-plugins/java/package-lock.json | 3 +++ 5 files changed, 65 insertions(+) create mode 100644 deadlock-plugins/java/.gitignore create mode 100644 deadlock-plugins/java/README.md create mode 100755 deadlock-plugins/java/build.sh create mode 100755 deadlock-plugins/java/install.sh create mode 100644 deadlock-plugins/java/package-lock.json diff --git a/deadlock-plugins/java/.gitignore b/deadlock-plugins/java/.gitignore new file mode 100644 index 00000000..c2550779 --- /dev/null +++ b/deadlock-plugins/java/.gitignore @@ -0,0 +1 @@ +vscode-java-pack-*/ \ No newline at end of file diff --git a/deadlock-plugins/java/README.md b/deadlock-plugins/java/README.md new file mode 100644 index 00000000..0a24ac1b --- /dev/null +++ b/deadlock-plugins/java/README.md @@ -0,0 +1,31 @@ +Ce plugin consiste à ajouter les plugins nécessaires pour le fonctionnement de Java dans Theia. + +On compile donc le package https://github.com/microsoft/vscode-java-pack qui contient les +éléménts suivants : + +- [📦 Language Support for Java™ by Red Hat ](https://marketplace.visualstudio.com/items?itemName=redhat.java) + - Code Navigation + - Auto Completion + - Refactoring + - Code Snippets +- [📦 Debugger for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug) + - Debugging +- [📦 Test Runner for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-test) + - Run & Debug JUnit/TestNG Test Cases +- [📦 Maven for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven) + - Project Scaffolding + - Custom Goals +- [📦 Project Manager for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-dependency) + - Manage Java projects, referenced libraries, resource files, packages, classes, and class members +- [📦 Visual Studio IntelliCode](https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode) + - AI-assisted development + - Completion list ranked by AI + +Aujourd'hui chaque release sur Github ne contient pas le plugin construit, on récupère donc les sources +et on construit le `vsix`. + +## Pourquoi ne pas ajouter le vsix dans l'image de Theia ? + +Actuellement le vsix de `vscode-java-pack` n'est pas téléchargeable directement à part sur `Open VSX` +mais lors de la récupération il va chercher une autre dépendance (IntelliCode) qui elle n'est pas présente +sur OpenVSX donc le build fail. \ No newline at end of file diff --git a/deadlock-plugins/java/build.sh b/deadlock-plugins/java/build.sh new file mode 100755 index 00000000..ad9854a6 --- /dev/null +++ b/deadlock-plugins/java/build.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +cd $(ls -d vscode-java-pack-*/|head -n 1) + +npm install +npm run build +npx vsce package \ No newline at end of file diff --git a/deadlock-plugins/java/install.sh b/deadlock-plugins/java/install.sh new file mode 100755 index 00000000..67effd31 --- /dev/null +++ b/deadlock-plugins/java/install.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +VERSION=0.18.7 +NAME="vscode-java-pack" + + +if [ -d "$NAME-$VERSION" ]; then + echo "$NAME sources exists, skipping download." + echo +else + echo "Download $NAME-$VERSION sources" + echo + curl -fSL https://github.com/microsoft/vscode-java-pack/archive/refs/tags/v$VERSION.tar.gz | tar -C ./ -xzs + + echo + echo "Download done" + echo +fi + diff --git a/deadlock-plugins/java/package-lock.json b/deadlock-plugins/java/package-lock.json new file mode 100644 index 00000000..48e341a0 --- /dev/null +++ b/deadlock-plugins/java/package-lock.json @@ -0,0 +1,3 @@ +{ + "lockfileVersion": 1 +} -- GitLab