-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull PMD and FindBugs out into separate projects.
This saves ~10-20s so down to around ~2min build.
- Loading branch information
Showing
5 changed files
with
79 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apply plugin: 'findbugs' | ||
|
||
findbugs { | ||
toolVersion FINDBUGS_VERSION | ||
} | ||
|
||
def library = project(':library') | ||
|
||
tasks.create('findbugs', FindBugs) { | ||
dependsOn library.tasks.compileDebugJavaWithJavac | ||
|
||
description 'Run findbugs' | ||
group 'verification' | ||
|
||
classes = fileTree(library.tasks.compileDebugJavaWithJavac.destinationDir) | ||
source library.android.sourceSets.main.java.srcDirs | ||
classpath = files() | ||
doFirst { | ||
classpath += library.classPathForQuality() | ||
} | ||
effort = 'max' | ||
excludeFilter = file("${library.projectDir}/findbugs-exclude.xml") | ||
|
||
// Failures are caught and printed by the violations plugin. | ||
ignoreFailures = true | ||
|
||
reports { | ||
xml.enabled = true | ||
html.enabled = false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apply plugin: 'pmd' | ||
|
||
def library = project(':library') | ||
|
||
pmd { | ||
toolVersion PMD_VERSION | ||
} | ||
|
||
tasks.create('pmd', Pmd) { | ||
dependsOn library.tasks.compileDebugJavaWithJavac | ||
targetJdk = TargetJdk.VERSION_1_7 | ||
|
||
description 'Run pmd' | ||
group 'verification' | ||
|
||
// If ruleSets is not empty, it seems to contain some | ||
// defaults which override rules in the ruleset file... | ||
ruleSets = [] | ||
ruleSetFiles = files("${library.projectDir}/pmd-ruleset.xml") | ||
source library.android.sourceSets.main.java.srcDirs | ||
classpath = files() | ||
classpath += files(library.tasks.compileDebugJavaWithJavac.destinationDir) | ||
doFirst { | ||
classpath += library.classPathForQuality() | ||
} | ||
|
||
//TODO enable this once new Gradle containing this flag is out | ||
//see https://github.com/gradle/gradle/pull/3125#issuecomment-352442432 | ||
//incrementalAnalysis = true | ||
|
||
// Failures are caught and printed by the violations plugin. | ||
ignoreFailures = true | ||
|
||
reports { | ||
xml.enabled = true | ||
html.enabled = false | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters