CORDA-2333: Bumped ClassGraph version to latest (#5214)

This commit is contained in:
Shams Asari 2019-06-12 13:27:51 +01:00 committed by GitHub
parent c32e3a9e26
commit 8480d49e7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -98,7 +98,7 @@ buildscript {
ext.commons_cli_version = '1.4'
ext.protonj_version = '0.33.0' // Overide Artemis version
ext.snappy_version = '0.4'
ext.class_graph_version = '4.6.12'
ext.class_graph_version = '4.8.38'
ext.jcabi_manifests_version = '1.1'
ext.picocli_version = '3.8.0'
ext.commons_io_version = '2.6'

View File

@ -54,15 +54,15 @@ data class TestCordappImpl(val scanPackage: String, override val config: Map<Str
private fun findRootPaths(scanPackage: String): Set<Path> {
return packageToRootPaths.computeIfAbsent(scanPackage) {
ClassGraph()
.whitelistPackages(scanPackage)
.pooledScan()
.use { it.allResources }
.asSequence()
.map { it.classpathElementFile.toPath() }
.filterNot { it.toString().endsWith("-tests.jar") }
.map { if (it.toString().endsWith(".jar")) it else findProjectRoot(it) }
.toSet()
val classGraph = ClassGraph().whitelistPackages(scanPackage)
classGraph.pooledScan().use {
it.allResources
.asSequence()
.map { it.classpathElementFile.toPath() }
.filterNot { it.toString().endsWith("-tests.jar") }
.map { if (it.toString().endsWith(".jar")) it else findProjectRoot(it) }
.toSet()
}
}
}