aboutsummaryrefslogtreecommitdiffstats
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2024-06-23 21:29:58 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2024-06-23 21:46:33 +0200
commit45d92310f55d953472c95e1f81b1a113178187fb (patch)
tree2bc0b868a8f8b80dda91f3355f8addc1a6eede0f /build.gradle.kts
parentbuild: automate GitHub pages deployment (diff)
downloadrefinery-45d92310f55d953472c95e1f81b1a113178187fb.tar.gz
refinery-45d92310f55d953472c95e1f81b1a113178187fb.tar.zst
refinery-45d92310f55d953472c95e1f81b1a113178187fb.zip
build: publish Maven snapshots to GH pages
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts25
1 files changed, 24 insertions, 1 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 3ed2b6be..3ec6ffe3 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,5 +1,5 @@
1/* 1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> 2 * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/>
3 * 3 *
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
@@ -25,6 +25,8 @@ val frontendFiles: FileCollection = files(
25 include("**/*.cjs") 25 include("**/*.cjs")
26} 26}
27 27
28val mavenRepositoryDir = layout.buildDirectory.map { it.dir("repo") }
29
28tasks { 30tasks {
29 val typeCheckFrontend by registering(RunYarn::class) { 31 val typeCheckFrontend by registering(RunYarn::class) {
30 dependsOn(installFrontend) 32 dependsOn(installFrontend)
@@ -60,6 +62,27 @@ tasks {
60 } 62 }
61} 63}
62 64
65val cleanMavenRepository by tasks.registering(Delete::class) {
66 delete(mavenRepositoryDir)
67}
68
69val mavenRepositoryTar by tasks.registering(Tar::class) {
70 dependsOn(cleanMavenRepository)
71 from(mavenRepositoryDir)
72 archiveFileName = "refinery-maven-repository.tar"
73 destinationDirectory = layout.buildDirectory
74}
75
76gradle.projectsEvaluated {
77 mavenRepositoryTar.configure {
78 for (subproject in rootProject.subprojects) {
79 if (subproject.plugins.hasPlugin(JavaPlugin::class)) {
80 dependsOn(subproject.tasks.named("publishMavenJavaPublicationToFileRepository"))
81 }
82 }
83 }
84}
85
63sonarqube.properties { 86sonarqube.properties {
64 property("sonar.nodejs.executable", "${frontend.nodeInstallDirectory.get()}/bin/node") 87 property("sonar.nodejs.executable", "${frontend.nodeInstallDirectory.get()}/bin/node")
65 property("sonar.eslint.reportPaths", "${layout.buildDirectory.get()}/eslint.json") 88 property("sonar.eslint.reportPaths", "${layout.buildDirectory.get()}/eslint.json")