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

Create a new subproject for SpotBugs Ant task #113

Merged
merged 6 commits into from
Feb 5, 2017

Conversation

KengoTODA
Copy link
Member

This pull request adds a missing subproject to release Ant task for SpotBugs.
I referred following part of build.xml to write build.gradle.

@KengoTODA KengoTODA self-assigned this Jan 31, 2017
@KengoTODA KengoTODA added this to the SpotBugs 3.1.0 milestone Jan 31, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.8%) to 57.545% when pulling c8426cc on KengoTODA:subproject-for-ant-task into 4fcc43c on spotbugs:master.

@@ -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)
Copy link
Member

@jsotuyod jsotuyod Jan 31, 2017

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.

@@ -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
Copy link
Member

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

@@ -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) }
Copy link
Member

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.

Copy link
Member Author

@KengoTODA KengoTODA Feb 1, 2017

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.

Copy link
Member Author

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").

Copy link
Member

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)

Copy link
Member Author

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!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.8%) to 57.545% when pulling 018a6b4 on KengoTODA:subproject-for-ant-task into 4fcc43c on spotbugs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.8%) to 57.545% when pulling 4973885 on KengoTODA:subproject-for-ant-task into 4fcc43c on spotbugs:master.

KengoTODA added a commit to KengoTODA/spotbugs that referenced this pull request Feb 1, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.8%) to 57.545% when pulling 3b6d683 on KengoTODA:subproject-for-ant-task into 4fcc43c on spotbugs:master.

@jsotuyod jsotuyod merged commit 8be3f8e into spotbugs:master Feb 5, 2017
@KengoTODA KengoTODA deleted the subproject-for-ant-task branch February 6, 2017 04:35
@KengoTODA
Copy link
Member Author

Thanks @jsotuyod !

@jsotuyod
Copy link
Member

jsotuyod commented Feb 6, 2017

@KengoTODA thank you for the amazing job!

KengoTODA added a commit to KengoTODA/spotbugs that referenced this pull request Feb 11, 2017
KengoTODA added a commit to KengoTODA/spotbugs that referenced this pull request Feb 14, 2017
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 this pull request may close these issues.

None yet

3 participants