diff --git a/plugins/reporters/web-app-template/build.gradle.kts b/plugins/reporters/web-app-template/build.gradle.kts index 20bd26c99ddff..71747463bf6ff 100644 --- a/plugins/reporters/web-app-template/build.gradle.kts +++ b/plugins/reporters/web-app-template/build.gradle.kts @@ -120,3 +120,11 @@ tasks.register("clean") { delete("node_modules") delete("yarn-error.log") } + +val webAppTemplateConfiguration by configurations.creating { + isCanBeResolved = false +} + +artifacts { + add(webAppTemplateConfiguration.name, yarnBuild) +} diff --git a/plugins/reporters/web-app/build.gradle.kts b/plugins/reporters/web-app/build.gradle.kts index da056def27026..aeed950912634 100644 --- a/plugins/reporters/web-app/build.gradle.kts +++ b/plugins/reporters/web-app/build.gradle.kts @@ -22,12 +22,17 @@ plugins { id("ort-plugin-conventions") } +val webAppTemplateConfiguration by configurations.creating { + isCanBeConsumed = false +} + +dependencies { + webAppTemplateConfiguration(project(":plugins:reporters:web-app-template", "webAppTemplateConfiguration")) +} + val generatedResourcesDir = layout.buildDirectory.dir("generated-resources/main") val copyWebAppTemplate by tasks.registering(Copy::class) { - val webAppTemplateProject = project.project(projects.plugins.reporters.webAppTemplate.path) - dependsOn(webAppTemplateProject.tasks["yarnBuild"]) - - from(webAppTemplateProject.file("build")) { + from(webAppTemplateConfiguration) { include("scan-report-template.html") }