Skip to content

Commit

Permalink
Add convenience compileAll task (apache#428)
Browse files Browse the repository at this point in the history
The added convenience `compileAll` tasks that bundles all compilation and packaging tasks to verify locally that all source code can be built and packaged.

Also adds group+description to the convenience `format` tasks so it appears in a `./gradlew tasks` output
  • Loading branch information
snazy authored Nov 7, 2024
1 parent 2097faf commit 4773bcf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build-logic/src/main/kotlin/polaris-java.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,17 @@ tasks.withType(JavaCompile::class.java).configureEach {
)
}

tasks.register("format").configure { dependsOn("spotlessApply") }
tasks.register("compileAll").configure {
group = "build"
description = "Runs all compilation and jar tasks"
dependsOn(tasks.withType<AbstractCompile>(), tasks.withType<ProcessResources>())
}

tasks.register("format").configure {
group = "verification"
description = "Runs all code formatting tasks"
dependsOn("spotlessApply")
}

tasks.named<Test>("test").configure {
useJUnitPlatform()
Expand Down

0 comments on commit 4773bcf

Please sign in to comment.