SpotBugs task configuration for subprojects

I’ve a base project and two subprojects.

I’m trying to configure spotbugs plugin described here.

My root build.gradle is straightforward:

plugins {
    id "base"
    id 'com.github.spotbugs' version '1.7.1' apply false
}

apply from: "$projectDir/gradle/repositories.gradle"
apply from: "$projectDir/gradle/java.gradle"
apply from: "$projectDir/gradle/spotbugs.gradle"

Where spotbugs.gradle is:

buildscript {
    repositories {
        maven { url 'https://plugins.gradle.org/m2/' }
    }
    dependencies {
        classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:1.7.1"
    }
}

subprojects {
    apply plugin: 'com.github.spotbugs'

    spotbugs {
        effort = 'max'
        toolVersion = '3.1.12'
    }

    tasks.withType(com.github.spotbugs.SpotBugsTask) {
        reports {
            html {
                enabled = true
            }
            xml {
                enabled = false
            }
        }
    }
}

As you can see I’ve disabled xml report generation and I’m only enabling html report generation.

However, after performing gradle build, it’s generating reports using xml format instead:

Any ideas?