Changes for AnimalSniffer
This commit is contained in:
parent
02e2644676
commit
6ec4e0cdba
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue