Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shipped html report stylesheets #107

Closed
Vampire opened this issue Feb 11, 2019 · 2 comments · Fixed by #127
Closed

shipped html report stylesheets #107

Vampire opened this issue Feb 11, 2019 · 2 comments · Fixed by #127
Milestone

Comments

@Vampire
Copy link

Vampire commented Feb 11, 2019

SpotBugs ships a handfull of html stylesheets like for example fancy-hist.xsl.
The Gradle plugin only supports text resources, so to use them (without copying them into your project) you need to do something like

configurations { spotbugsStylesheets { transitive false } }
dependencies { spotbugsStylesheets 'com.github.spotbugs:spotbugs:3.1.10' }
tasks.withType(SpotBugsTask) {
    reports {
        xml.enabled false
        html {
            enabled true
            stylesheet resources.text.fromArchiveEntry(configurations.spotbugsStylesheets, 'fancy-hist.xsl')
        }
    }
}

which is a bit cumbersome for using the stylesheets that are actually already shipped.
Would be nice if there were a stylesheet method that accepts the shipped stylesheets and transforms them to Gradle text resources automatically.

@Vampire
Copy link
Author

Vampire commented Feb 11, 2019

One further note, if you add support for this, please also consider adding the stylesheet resource as input. See gradle/gradle#8473.

@Vampire
Copy link
Author

Vampire commented Feb 12, 2019

If you use resources.text.fromArchiveEntry actually.
With resources.text.fromFile and resources.text.fromString incremental build works fine it seems.

@KengoTODA KengoTODA added this to the 1.7.0 milestone Feb 14, 2019
KengoTODA added a commit that referenced this issue Mar 14, 2019
* refs #111: add -release arg for better reporting

* refs #111: add -projectName arg for better reporting

* issue #107: support relative path for stylesheet (XSL)

* add CHANGELOG entry

* make each field transient

* reorder modifiers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants