com.netflix.nebula.lint.rule.dependency.JarContents.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-lint-plugin Show documentation
Show all versions of gradle-lint-plugin Show documentation
Pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts
package com.netflix.nebula.lint.rule.dependency
import groovy.transform.CompileDynamic
class JarContents {
Set entryNames
/**
* Fully qualified class names with '/' package separators
*/
@Lazy Set classes = entryNames
// classes like org/hornetq/utils/HornetQUtilLogger_$logger are generated by references to interface fields, skip these
.findAll { it.endsWith('.class') && !(it =~ /_\$\w+\.class$/) }
.collect { it.replaceAll(/\.class$/, '') }
.toSet()
@Lazy boolean isServiceProvider = entryNames.any { it == 'META-INF/services/' }
@Lazy boolean nothingButMetaInf = !entryNames.any { !it.startsWith('META-INF') }
@Lazy boolean isWebjar = entryNames.any { it == 'META-INF/resources/webjars/' }
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy