Skip to content

Commit

Permalink
build(web-app): Make cross-project sharing of outputs more reliable
Browse files Browse the repository at this point in the history
Follow the instructions at [1]. Fixes #9515.

[1]: https://docs.gradle.org/current/samples/sample_cross_project_output_sharing.html

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Nov 28, 2024
1 parent 28a26c3 commit a093540
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
8 changes: 8 additions & 0 deletions plugins/reporters/web-app-template/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,11 @@ tasks.register<Delete>("clean") {
delete("node_modules")
delete("yarn-error.log")
}

val webAppTemplateConfiguration by configurations.creating {
isCanBeResolved = false
}

artifacts {
add(webAppTemplateConfiguration.name, yarnBuild)
}
13 changes: 9 additions & 4 deletions plugins/reporters/web-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit a093540

Please sign in to comment.