aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Marion <steve.marion@sonarsource.com>2024-08-21 15:37:48 +0200
committersonartech <sonartech@sonarsource.com>2024-08-27 20:02:40 +0000
commitd4fd4fcbbc8d658e9863483a00fa91ffa34bc078 (patch)
treee9e54d46d3b6bccc419c26faf921c7232a57ebac
parent90793a92b3f35c97db4a563e965e7225b163c327 (diff)
downloadsonarqube-d4fd4fcbbc8d658e9863483a00fa91ffa34bc078.tar.gz
sonarqube-d4fd4fcbbc8d658e9863483a00fa91ffa34bc078.zip
SONAR-19710 fix implicit task dependencies. skip java plugin tasks for frontend builds
-rw-r--r--server/sonar-web/build.gradle8
-rw-r--r--server/sonar-web/design-system/build.gradle4
-rw-r--r--sonar-sarif/build.gradle10
3 files changed, 16 insertions, 6 deletions
diff --git a/server/sonar-web/build.gradle b/server/sonar-web/build.gradle
index cbb2a5b1b10..51c3d57b0e2 100644
--- a/server/sonar-web/build.gradle
+++ b/server/sonar-web/build.gradle
@@ -21,6 +21,8 @@ task "yarn_design-system"(type: Exec) {
outputs.cacheIf { true }
}
+compileJava.onlyIf {false}
+
task yarn_run(type: Exec) {
dependsOn "yarn_design-system"
@@ -42,8 +44,6 @@ task yarn_run(type: Exec) {
build.dependsOn(yarn_run)
task "yarn_lint-report-ci"(type: Exec) {
- dependsOn "yarn_design-system"
-
// Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
['config', 'src/main/js'].each {
inputs.dir(it)
@@ -59,7 +59,7 @@ task "yarn_lint-report-ci"(type: Exec) {
task "yarn_validate-ci"(type: Exec) {
dependsOn "yarn_design-system"
-
+
// Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
['config', 'src/main/js', 'design-system'].each {
inputs.dir(it)
@@ -75,7 +75,7 @@ task "yarn_validate-ci"(type: Exec) {
task "yarn_check-ci"(type: Exec) {
dependsOn "yarn_design-system"
-
+
// Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
['config', 'src'].each {
inputs.dir(it)
diff --git a/server/sonar-web/design-system/build.gradle b/server/sonar-web/design-system/build.gradle
index 5b5b13b8920..a2d2c511c2b 100644
--- a/server/sonar-web/design-system/build.gradle
+++ b/server/sonar-web/design-system/build.gradle
@@ -12,6 +12,10 @@ sonar {
}
}
+jar.onlyIf {false}
+compileJava.onlyIf {false}
+processResources.onlyIf {false}
+
task "yarn_validate-ci"(type: Exec) {
dependsOn ":server:sonar-web:yarn_run"
diff --git a/sonar-sarif/build.gradle b/sonar-sarif/build.gradle
index 23466430d27..78bf955e6aa 100644
--- a/sonar-sarif/build.gradle
+++ b/sonar-sarif/build.gradle
@@ -1,3 +1,5 @@
+import nl.javadude.gradle.plugins.license.License
+
plugins {
id "org.jsonschema2pojo" version "1.2.1"
}
@@ -17,5 +19,9 @@ jsonSchema2Pojo {
}
license {
- excludes(["org/sonar/sarif/pojo/**/*"])
-} \ No newline at end of file
+ exclude("org/sonar/sarif/pojo/**/*")
+}
+
+tasks.withType(License).configureEach { licenseTask ->
+ licenseTask.mustRunAfter(tasks.named("generateJsonSchema2Pojo"))
+}