Skip to content

Commit

Permalink
build(IA-4442): enforce spotlessCheck in CI (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpate4 authored Jan 9, 2024
1 parent 12ece1b commit 7cd81c7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions service/tooling.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,21 @@ spotless {
}
}

compileJava.dependsOn spotlessApply

idea.module.downloadJavadoc = true

// Immutables has incremental compilation disabled by default
tasks {
boolean isCiServer = System.getenv().containsKey("CI")

compileJava {
options.compilerArgs.add("-Aimmutables.gradle.incremental")

// enforce consistency in CI environment, and
// enable auto-format in development environment
if (isCiServer) {
dependsOn(spotlessCheck)
} else {
dependsOn(spotlessApply)
}
}
}

0 comments on commit 7cd81c7

Please sign in to comment.