@@ -4,32 +4,12 @@ plugins {
44 id(" org.gradlex.extra-java-module-info" )
55}
66
7- // Dependencies that are missing in metadata because the 'compileOnlyApi' scope is not supported by
8- // POM. We add these dependencies with a version to avoid maintaining versions in every single
9- // project. These are "only" annotation libraries that are not included in the runtime classpath.
10- // Because of this, they are not automatically visible to the consistent resolution. Therefore, we
11- // need to explicitly add them to the version-providing Configuration (called mainRuntimeClasspath).
12- val additionalTransitiveCompileOnlyApiDependencies =
13- listOf (
14- " biz.aQute.bnd:biz.aQute.bnd.annotation:7.1.0" ,
15- " com.google.errorprone:error_prone_annotations:2.36.0" ,
16- " org.jspecify:jspecify:1.0.0" ,
17- )
18-
197// Fix or enhance the metadata of third-party Modules. This is about the metadata in the
208// repositories: '*.pom' and '*.module' files.
219jvmDependencyConflicts.patch {
2210 // WORKAROUND: https://github.com/hyperledger/besu/pull/8443
2311 module(" org.hyperledger.besu:bom" ) { removeDependency(" javax.inject:javax.inject" ) }
2412
25- // WORKAROUND: https://github.com/apache/logging-log4j2/issues/3437
26- module(" org.apache.logging.log4j:log4j-api" ) {
27- additionalTransitiveCompileOnlyApiDependencies.forEach { addCompileOnlyApiDependency(it) }
28- }
29- module(" org.apache.logging.log4j:log4j-core" ) {
30- additionalTransitiveCompileOnlyApiDependencies.forEach { addCompileOnlyApiDependency(it) }
31- }
32-
3313 // Register JARs with classifier as features
3414 module(" io.netty:netty-transport-native-epoll" ) {
3515 addFeature(" linux-x86_64" ) // refer to as 'io.netty.transport.epoll.linux.x86_64'
@@ -308,6 +288,8 @@ extraJavaModuleInfo {
308288 )
309289 module(" org.hdrhistogram:HdrHistogram" , " org.hdrhistogram" )
310290 module(" org.latencyutils:LatencyUtils" , " org.latencyutils" )
291+ module(" org.osgi:org.osgi.annotation.bundle" , " org.osgi.annotation.bundle" )
292+ module(" org.osgi:org.osgi.annotation.versioning" , " org.osgi.annotation.versioning" )
311293
312294 // Annotation processing only
313295 module(" com.google.auto.service:auto-service-annotations" , " com.google.auto.service" )
@@ -416,10 +398,5 @@ configurations.getByName("mainRuntimeClasspath") {
416398 attributes.attribute(consistentResolutionAttribute, " global" )
417399}
418400
419- // WORKAROUND: https://github.com/apache/logging-log4j2/issues/3437
420- additionalTransitiveCompileOnlyApiDependencies.forEach {
421- dependencies.add(" mainRuntimeClasspath" , it)
422- }
423-
424401// In case published versions of a module are also available, always prefer the local one
425402configurations.all { resolutionStrategy.preferProjectModules() }
0 commit comments