-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Update dependencies in hale-platform to resolve security issues
update libraries ING-4067
- Loading branch information
1 parent
bd60c74
commit b1a16b8
Showing
5 changed files
with
192 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import org.gradle.api.artifacts.DependencyResolveDetails | ||
|
||
/** | ||
* Adds slf4j and logback to the platform | ||
*/ | ||
def slf4jAndLogback(String slf4jVersion = '1.7.5', String logbackVersion = '1.0.13') { | ||
def log4jToSlf4jjVersion = '2.19.0' | ||
repositories { | ||
mavenCentral() | ||
} | ||
configurations { | ||
bndplatform { | ||
// resolution configuration for logging bridges (... over slf4j) | ||
|
||
resolutionStrategy.eachDependency { DependencyResolveDetails details -> | ||
if (details.requested.name == 'commons-logging') { | ||
// prefer 'jcl-over-slf4j' over 'commons-logging' | ||
details.useTarget "org.slf4j:jcl-over-slf4j:${slf4jVersion}" | ||
} | ||
} | ||
|
||
resolutionStrategy.eachDependency { DependencyResolveDetails details -> | ||
if (details.requested.name == 'log4j' && details.requested.group == 'log4j') { | ||
// prefer 'log4j-over-slf4j' over 'log4j' | ||
details.useTarget "org.slf4j:log4j-over-slf4j:${slf4jVersion}" | ||
} | ||
} | ||
|
||
// exclude SLF4J over LOG4J - logback is used | ||
exclude group: "org.slf4j", module: "slf4j-log4j12" | ||
} | ||
} | ||
|
||
platform { | ||
feature id: 'platform.shared.slf4jlogback', | ||
name: 'SLF4J and Logback', | ||
version: slf4jVersion, { | ||
// slf4j | ||
bundle "org.slf4j:slf4j-api:${slf4jVersion}" | ||
// bundle "org.slf4j:slf4j-ext:${slf4jVersion}" | ||
bundle "org.slf4j:slf4j-ext:${slf4jVersion}", { | ||
bnd { | ||
optionalImport 'ch.qos.cal10n', 'ch.qos.cal10n.*' | ||
} | ||
} | ||
bundle "org.apache.logging.log4j:log4j-to-slf4j:${log4jToSlf4jjVersion}" | ||
|
||
// jul adapter | ||
bundle "org.slf4j:jul-to-slf4j:${slf4jVersion}" | ||
|
||
// logback | ||
bundle "ch.qos.logback:logback-classic:${logbackVersion}" | ||
bundle "ch.qos.logback:logback-core:${logbackVersion}", { | ||
bnd { | ||
// suppress Require-Capability: osgi.ee;filter:="(osgi.ee=UNKNOWN)" generated by bnd | ||
instruction '-removeheaders', 'Require-Capability' | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.