Skip to content

Commit

Permalink
build: Add Spotless Fail Fast to the build process (hyperledger#7515)
Browse files Browse the repository at this point in the history
* Add Spotless Fail Fast to the build process

---------

Signed-off-by: 7suyash7 <[email protected]>
Co-authored-by: Usman Saleem <[email protected]>
  • Loading branch information
7suyash7 and usmansaleem authored Aug 27, 2024
1 parent e0aa4f6 commit c656ece
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ sonarqube {
}
}

tasks.register('spotlessCheckFast') {
dependsOn subprojects.collect { it.tasks.withType(com.diffplug.gradle.spotless.SpotlessCheck) }
}

project.tasks["sonarqube"].dependsOn "jacocoRootReport"

if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21)) {
Expand Down Expand Up @@ -432,6 +436,12 @@ allprojects {
options.addStringOption('Xwerror', '-html5')
options.encoding = 'UTF-8'
}

plugins.withType(JavaPlugin) {
tasks.withType(JavaCompile) {
it.dependsOn(rootProject.tasks.named('spotlessCheckFast'))
}
}
}

task deploy() {}
Expand All @@ -455,7 +465,7 @@ task checkMavenCoordinateCollisions {

tasks.register('checkPluginAPIChanges', DefaultTask) {}
checkPluginAPIChanges.dependsOn(':plugin-api:checkAPIChanges')
check.dependsOn('checkPluginAPIChanges', 'checkMavenCoordinateCollisions')
check.dependsOn('checkPluginAPIChanges', 'checkMavenCoordinateCollisions', 'spotlessCheckFast')

subprojects {

Expand Down

0 comments on commit c656ece

Please sign in to comment.