Skip to content

Commit

Permalink
fix: only depend on 'extractConfig' when the root project is Terasology
Browse files Browse the repository at this point in the history
  • Loading branch information
skaldarnar committed Sep 7, 2023
1 parent 312c4bd commit d1d59db
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions build-logic/src/main/kotlin/terasology-metrics.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,28 @@ tasks.withType<Test> {
}
}

tasks.withType<Checkstyle> {
dependsOn(tasks.getByPath(":extractConfig"))
}
tasks.withType<Checkstyle> {
//FIXME: This is a workaround for module harness builds, where the config
// files are part of the harness but the task is not defined.
if (rootProject.name == "Terasology") {
dependsOn(tasks.getByPath(":extractConfig"))
}
}

tasks.withType<Pmd> {
dependsOn(tasks.getByPath(":extractConfig"))
//FIXME: This is a workaround for module harness builds, where the config
// files are part of the harness but the task is not defined.
if (rootProject.name == "Terasology") {
dependsOn(tasks.getByPath(":extractConfig"))
}
}

tasks.withType<SpotBugsTask> {
dependsOn(tasks.getByPath(":extractConfig"))
//FIXME: This is a workaround for module harness builds, where the config
// files are part of the harness but the task is not defined.
if (rootProject.name == "Terasology") {
dependsOn(tasks.getByPath(":extractConfig"))
}
}

// The config files here work in both a multi-project workspace (IDEs, running from source) and for solo module builds
Expand Down

0 comments on commit d1d59db

Please sign in to comment.