LUCENE-9479: Forbiddenapis & Gradle: Add commons-io bundled signatures (#1780)

This commit is contained in:
Uwe Schindler 2020-08-25 09:05:06 +02:00 committed by GitHub
parent 098f0dc8b4
commit 6abce32a3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -26,8 +26,9 @@ allprojects { prj ->
// This helper method appends signature files based on a set of true
// dependencies from a given configuration.
def dynamicSignatures = { configuration, suffix ->
def deps = configuration.resolvedConfiguration.resolvedArtifacts
def resolvedMods = configuration.resolvedConfiguration.resolvedArtifacts
.collect { a -> a.moduleVersion.id }
def deps = resolvedMods
.collect { id -> [
"${id.group}.${id.name}.all.txt",
"${id.group}.${id.name}.${suffix}.txt",
@ -46,6 +47,11 @@ allprojects { prj ->
logger.debug("Signature file omitted (does not exist): ${sig}")
}
}
// commons-io is special: forbiddenapis has a versioned bundledSignature.
bundledSignatures += resolvedMods
.findAll { id -> id.group == 'commons-io' && id.name == 'commons-io' }
.collect { id -> "${id.name}-unsafe-${id.version}" as String }
}
// Configure defaults for sourceSets.main