Skip to content

How to SpotBugsTask configuration in standalone plugin? #642

Answered by Avi1235
Avi1235 asked this question in Q&A
Discussion options

You must be logged in to vote

I got it using groovy was easier, this is what i wanted to do just didn't know how 😅

class PluginprovyPlugin implements Plugin<Project> {
    void apply(Project project) {
        project.plugins.apply(SpotBugsPlugin)
        def buildDir = project.buildDir
        project.getTasks().configure {
            spotbugsMain {
                reports {
                    html {
                        required = true
                        outputLocation = project.file("$buildDir/reports/spotbugs/main/spotbugs.html")
                        stylesheet = 'fancy-hist.xsl'
                    }
                }
            }
        }
            // Register a task
            project.tasks.re…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Avi1235
Comment options

@Avi1235
Comment options

Answer selected by Avi1235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants