Alternative solution to execute spotlessCheck first during a build (#7541)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
pull/7546/head
Fabio Di Fabio 3 months ago committed by GitHub
parent 77743b22f2
commit 039f0441c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 19
      build.gradle

@ -45,10 +45,6 @@ sonarqube {
} }
} }
tasks.register('spotlessCheckFast') {
dependsOn subprojects.collect { it.tasks.withType(com.diffplug.gradle.spotless.SpotlessCheck) }
}
project.tasks["sonarqube"].dependsOn "jacocoRootReport" project.tasks["sonarqube"].dependsOn "jacocoRootReport"
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21)) { if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21)) {
@ -60,12 +56,15 @@ group = 'org.hyperledger.besu'
defaultTasks 'build', 'checkLicense', 'javadoc' defaultTasks 'build', 'checkLicense', 'javadoc'
def buildAliases = ['dev': [ def buildAliases = [
'dev': [
'spotlessApply', 'spotlessApply',
'build', 'build',
'checkLicense', 'checkLicense',
'javadoc' 'javadoc'
]] ],
'build': ['spotlessCheck', 'build']
]
def expandedTaskList = [] def expandedTaskList = []
gradle.startParameter.taskNames.each { gradle.startParameter.taskNames.each {
@ -436,12 +435,6 @@ allprojects {
options.addStringOption('Xwerror', '-html5') options.addStringOption('Xwerror', '-html5')
options.encoding = 'UTF-8' options.encoding = 'UTF-8'
} }
plugins.withType(JavaPlugin) {
tasks.withType(JavaCompile) {
it.dependsOn(rootProject.tasks.named('spotlessCheckFast'))
}
}
} }
task deploy() {} task deploy() {}
@ -465,7 +458,7 @@ task checkMavenCoordinateCollisions {
tasks.register('checkPluginAPIChanges', DefaultTask) {} tasks.register('checkPluginAPIChanges', DefaultTask) {}
checkPluginAPIChanges.dependsOn(':plugin-api:checkAPIChanges') checkPluginAPIChanges.dependsOn(':plugin-api:checkAPIChanges')
check.dependsOn('checkPluginAPIChanges', 'checkMavenCoordinateCollisions', 'spotlessCheckFast') check.dependsOn('checkPluginAPIChanges', 'checkMavenCoordinateCollisions')
subprojects { subprojects {

Loading…
Cancel
Save