From 770c5f714ab6f964c65f79f42a12d40d4fbf7993 Mon Sep 17 00:00:00 2001 From: Jinbo Wang Date: Thu, 30 Mar 2023 10:05:56 +0800 Subject: [PATCH] Adopt the lombok@1.18.27 edge release Signed-off-by: Jinbo Wang --- gulpfile.js | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 2ed13f1bd..8aa059aaa 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -116,15 +116,31 @@ gulp.task('download_jre', async function (done) { done(); }); -gulp.task('download_lombok', function (done) { +gulp.task('download_lombok', async function (done) { if (fse.existsSync('./lombok')) { fse.removeSync('./lombok'); } - const lombokVersion = '1.18.24'; - // The latest lombok version can be found on the website https://projectlombok.org/downloads - const lombokUrl = `https://projectlombok.org/downloads/lombok-${lombokVersion}.jar`; - download(lombokUrl) - .pipe(gulp.dest('./lombok/')) + + await new Promise(function (resolve, reject) { + // Adopt lombok-1.18.27 edge release for the issue https://github.com/redhat-developer/vscode-java/issues/2887 + download("https://projectlombok.org/lombok-edge.jar") + .pipe(gulp.dest('./lombok/')) + .on("error", reject) + .on('end', () => { + fse.renameSync("./lombok/lombok-edge.jar", "./lombok/lombok-1.18.27.jar"); + resolve(); + }); + + // TODO: Switch to stable version once lombok 1.18.28 is released. + + // const lombokVersion = '1.18.24'; + // // The latest lombok version can be found on the website https://projectlombok.org/downloads + // const lombokUrl = `https://projectlombok.org/downloads/lombok-${lombokVersion}.jar`; + // download(lombokUrl) + // .pipe(gulp.dest('./lombok/')) + // .on("error", reject) + // .on('end', resolve); + }); done(); });