-
Notifications
You must be signed in to change notification settings - Fork 578
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
Create a new subproject for SpotBugs Ant task #113
Conversation
findbugs/build.gradle
Outdated
@@ -178,7 +178,7 @@ task unzipDist(type:Copy, dependsOn:distZip) { | |||
task smokeTest { | |||
dependsOn unzipDist | |||
doLast { | |||
ant.taskdef(name:'spotbugs', classname:'edu.umd.cs.findbugs.anttask.FindBugsTask', classpath:jar.outputs.files.asPath) | |||
ant.taskdef(name:'spotbugs', classname:'edu.umd.cs.findbugs.anttask.FindBugsTask', classpath:project(':spotbugs-ant').jar.outputs.files.asPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you are to do this, you should add project(':spotbugs-ant').jar
to this task's dependsOn
at line 179.
findbugs/build.gradle
Outdated
@@ -58,7 +62,10 @@ tasks.withType(Jar).all { | |||
|
|||
// Manually define what goes into the default jar, since it's not only main sourceset | |||
jar { | |||
dependsOn project(':spotbugs-annotations').compileJava |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be necessary, you are already adding it as a compile dependency
findbugs/build.gradle
Outdated
@@ -189,6 +196,7 @@ task smokeTest { | |||
sourcePath(path:'src/main/java:src/gui:src/test/java:src/tools') | |||
'class'(location:project.tasks['compileJava'].destinationDir) | |||
auxClasspath(path:project.fileTree(dir:'lib', include:'**/*.jar').asPath) | |||
configurations.compile.each { File file -> auxClasspath(path:file.path) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auxClasspath(configurations.compile.asPath)
?
Also, this should already include the lib dir, so line 198 is not needed anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this should already include the lib dir, so line 198 is not needed anymore.
#109 deleted jar file from findbugs/lib
directory, so we need to add configurations.compile
explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auxClasspath(configurations.compile.asPath)?
Will trigger following build failure:
* What went wrong:
Execution failed for task ':findbugs:smokeTest'.
> The <path> type doesn't support nested text data ("/Users/k....0.1.jar").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird... non the less, configurations.compile
includes project.fileTree(dir:'lib', include:'**/*.jar')
, so you can delete auxClasspath(path:project.fileTree(dir:'lib', include:'**/*.jar').asPath)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted, thanks for your review!
Thanks @jsotuyod ! |
@KengoTODA thank you for the amazing job! |
This pull request adds a missing subproject to release Ant task for SpotBugs.
I referred following part of
build.xml
to writebuild.gradle
.