Skip to content

Commit

Permalink
Don't depend on build sources in mod score if `MODULE_SCORE_INCLUDE_G…
Browse files Browse the repository at this point in the history
…ENERATED` is false (#1065)

Otherwise this would fail to execute because the dir doesn't exist

<!--
  ⬆ Put your description above this! ⬆

  Please be descriptive and detailed.
  
Please read our [Contributing
Guidelines](https://github.com/tinyspeck/foundry/blob/main/.github/CONTRIBUTING.md)
and [Code of Conduct](https://slackhq.github.io/code-of-conduct).

Don't worry about deleting this, it's not visible in the PR!
-->
  • Loading branch information
ZacSweers authored Oct 29, 2024
1 parent 265d56d commit daa8ac3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changelog
**Unreleased**
--------------

* **Fix**: Don't depend on build sources in mod score if `MODULE_SCORE_INCLUDE_GENERATED` is false

0.21.0
------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ public object ModuleStatsTasks {

val generatedSourcesAdded = AtomicBoolean()
val addGeneratedSources = {
if (locTask != null && generatedSourcesAdded.compareAndSet(false, true)) {
locTask.configure {
val shouldConfigure =
locTask != null && generatedSourcesAdded.compareAndSet(false, true) && includeGenerated
if (shouldConfigure) {
locTask!!.configure {
generatedSrcsDir.setDisallowChanges(project.layout.buildDirectory.dir("generated"))
}
}
Expand Down

0 comments on commit daa8ac3

Please sign in to comment.