Changes for AnimalSniffer

This commit is contained in:
Steve Ebersole 2015-04-01 19:19:03 -05:00
parent 02e2644676
commit 6ec4e0cdba
2 changed files with 9 additions and 6 deletions

View File

@ -147,7 +147,7 @@ subprojects { subProject ->
configurations {
all*.exclude group: 'xml-apis', module: 'xml-apis'
}
animalSniffer
animalSnifferSignature
javaApiSignature
}
@ -175,6 +175,7 @@ subprojects { subProject ->
jaxb( libraries.jaxb2_jaxb )
jaxb( libraries.jaxb2_jaxb_xjc )
animalSnifferSignature( libraries.java16_signature )
javaApiSignature ( libraries.java16_signature )
}
@ -338,8 +339,9 @@ subprojects { subProject ->
if ( subProject.name != 'hibernate-java8' ) {
apply plugin: org.hibernate.build.animalsniffer.AnimalSnifferPlugin
animalsniffer {
signature = "org.codehaus.mojo.signature:java16:+@signature"
animalSniffer {
skip = true;
}
}

View File

@ -40,8 +40,8 @@ class AnimalSnifferPlugin implements Plugin<Project> {
@Override
void apply(Project project) {
project.configurations.maybeCreate( "signature" )
final AnimalSnifferExtension extension = project.extensions.create( "animalsniffer", AnimalSnifferExtension )
project.configurations.maybeCreate( "animalSnifferSignature" )
final AnimalSnifferExtension extension = project.extensions.create( "animalSniffer", AnimalSnifferExtension )
project.tasks.findByName( JavaPlugin.CLASSES_TASK_NAME ).doLast(
new Action<Task>() {
@ -52,8 +52,9 @@ class AnimalSnifferPlugin implements Plugin<Project> {
}
def logger = new GradleLogger( logger )
def signatures = project.configurations.signature.resolvedConfiguration.resolvedArtifacts*.file
def signatures = project.configurations.animalSnifferSignature.resolvedConfiguration.resolvedArtifacts*.file
signatures.each {
task.logger.lifecycle( "Starting AnimalSniffer checks against [${it.name}]" )
SignatureChecker signatureChecker = new SignatureChecker(
it.newInputStream(),
Collections.emptySet(),