Skip to content

Commit

Permalink
Ensure that InfoBrokerPlugin is on the classpath
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider committed May 1, 2016
1 parent 394cfd4 commit b3d11c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ publishing {
.dependency
.findAll {
// JGit is shaded inside the distribution, and we want the others to act as 'provided'
['org.eclipse.jgit', 'org.spockframework', 'com.netflix.nebula'].contains(it.groupId.text())
['org.eclipse.jgit', 'spock-core', 'nebula-test'].contains(it.artifactId.text())
}
.each { it.parent().remove(it) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ class GradleLintInfoBrokerAction extends GradleLintViolationAction {

@Override
void lintFinished(Collection<GradleViolation> violations) {
def reportItems = violations.collect { v ->
def buildFilePath = project.rootDir.toURI().relativize(v.buildFile.toURI()).toString()
new LintViolationReportItem(buildFilePath, v.rule.ruleId as String, v.level.toString(),
v.lineNumber ?: -1, v.sourceLine ?: 'unspecified')
project.getPlugins().withType(InfoBrokerPlugin) {
def reportItems = violations.collect { v ->
def buildFilePath = project.rootDir.toURI().relativize(v.buildFile.toURI()).toString()
new LintViolationReportItem(buildFilePath, v.rule.ruleId as String, v.level.toString(),
v.lineNumber ?: -1, v.sourceLine ?: 'unspecified')
}
it.addReport('gradleLintViolations', reportItems)
}

project.getPlugins().withType(InfoBrokerPlugin) { it.addReport('gradleLintViolations', reportItems) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,7 @@ class UnusedDependencyRuleSpec extends TestKitSpecification {
"""
then:
def results = runTasksSuccessfully('compileTestJava', 'fixGradleLint')
println(results.output)
runTasksSuccessfully('compileTestJava', 'fixGradleLint')
dependencies(buildFile, 'compile') == []
dependencies(buildFile, 'runtime') == ['org.webjars:acorn:0.5.0']
Expand Down

0 comments on commit b3d11c8

Please sign in to comment.