Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions gradle/rat.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ class RatTask extends DefaultTask {
@Input
List<String> excludes

def reportPath = 'build/rat'
def stylesheet = 'gradle/resources/rat-output-to-html.xsl'
def reportPath = "${project.buildDir}/rat"
def stylesheet = "${project.projectDir}/gradle/resources/rat-output-to-html.xsl"
def xmlReport = reportPath + '/rat-report.xml'
def htmlReport = reportPath + '/rat-report.html'

def generateXmlReport(File reportDir) {
def antBuilder = services.get(IsolatedAntBuilder)
def ratClasspath = project.configurations.rat
def scanDir = project.projectDir
antBuilder.withClasspath(ratClasspath).execute {
ant.taskdef(resource: 'org/apache/rat/anttasks/antlib.xml')
ant.report(format: 'xml', reportFile: xmlReport) {
fileset(dir: ".") {
fileset(dir: scanDir) {
patternset {
excludes.each {
exclude(name: it)
Expand Down