From 285cbf6c4bd4b94a6675eaa37725f7aac77de5f7 Mon Sep 17 00:00:00 2001 From: Steve Hill Date: Wed, 27 Oct 2021 14:58:47 -0700 Subject: [PATCH 1/2] Revert "Fix: Copy the API Viewer resources into the built plugin" This reverts commit 6b3e9f1be59e49a64c8f81ca1f3fdb63a825bed9. --- .gitignore | 3 --- job-dsl-plugin/build.gradle | 21 ++++++++------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index db87237c5..4d09ac527 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,3 @@ generated .bundle node_modules - -!job-dsl-plugin/src/main/webapp/api-viewer/config.json -job-dsl-plugin/src/main/webapp/api-viewer diff --git a/job-dsl-plugin/build.gradle b/job-dsl-plugin/build.gradle index 994ca7d32..a6ad4e3a3 100644 --- a/job-dsl-plugin/build.gradle +++ b/job-dsl-plugin/build.gradle @@ -12,6 +12,7 @@ buildscript { plugins { id 'org.jenkins-ci.jpi' version '0.43.0' + id 'war' } java { @@ -90,22 +91,16 @@ test { systemProperty 'jenkins.test.noSpaceInTmpDirs', 'true' } -task copyApiViewer { - copy { - from(project(':job-dsl-api-viewer').projectDir) - include 'index.html' - into 'src/main/webapp/api-viewer' - } - copy { - from(project(':job-dsl-api-viewer').buildDir) - include 'dist/**' - into 'src/main/webapp/api-viewer/build' +war { + into('api-viewer') { + from(project(':job-dsl-api-viewer').projectDir) { + include 'index.html' + include 'build/dist/**' + } } + dependsOn tasks.getByPath(':job-dsl-api-viewer:build') } -copyApiViewer.dependsOn ':job-dsl-api-viewer:build' -jpi.dependsOn 'copyApiViewer' - dependencies { annotationProcessor 'net.java.sezpoz:sezpoz:1.13' annotationProcessor 'org.jenkins-ci:annotation-indexer:1.12' From 28736a9253d4ff09d9b7924c9299226183eaa970 Mon Sep 17 00:00:00 2001 From: Steve Hill Date: Wed, 27 Oct 2021 15:07:33 -0700 Subject: [PATCH 2/2] Define configuration for jpi instead of war Closes jenkinsci/gradle-jpi-plugin#193 --- job-dsl-plugin/build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/job-dsl-plugin/build.gradle b/job-dsl-plugin/build.gradle index a6ad4e3a3..492fe9cd6 100644 --- a/job-dsl-plugin/build.gradle +++ b/job-dsl-plugin/build.gradle @@ -12,7 +12,6 @@ buildscript { plugins { id 'org.jenkins-ci.jpi' version '0.43.0' - id 'war' } java { @@ -91,7 +90,7 @@ test { systemProperty 'jenkins.test.noSpaceInTmpDirs', 'true' } -war { +jpi { into('api-viewer') { from(project(':job-dsl-api-viewer').projectDir) { include 'index.html'