Skip to content

Commit

Permalink
KGP fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Dec 10, 2024
1 parent ecfffe1 commit 9413e71
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import foundry.gradle.getByType
import foundry.gradle.lint.DetektTasks
import foundry.gradle.not
import foundry.gradle.onFirst
import foundry.gradle.properties.setDisallowChanges
import foundry.gradle.util.configureKotlinCompilationTask
import java.io.File
import java.util.concurrent.atomic.AtomicBoolean
Expand Down Expand Up @@ -116,10 +115,12 @@ internal object KgpTasks {
project.tasks.configureKotlinCompilationTask {
compilerOptions {
// These are set here because they're task-specific
// Don't use setDisallowChanges because KGP may sync conventions later and that blocks
// that
if (this@configureKotlinCompilationTask.name.contains("test", ignoreCase = true)) {
allWarningsAsErrors.setDisallowChanges(foundryProperties.allowWarningsInTests.not())
allWarningsAsErrors.set(foundryProperties.allowWarningsInTests.not())
} else {
allWarningsAsErrors.setDisallowChanges(foundryProperties.allowWarnings.not())
allWarningsAsErrors.set(foundryProperties.allowWarnings.not())
}
}
}
Expand Down

0 comments on commit 9413e71

Please sign in to comment.