You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/11/14 21:32:33 UTC

[GitHub] [logging-log4j2] ppkarwasz commented on a diff in pull request #1141: (doc) Use Gradle platform to import Log4j BOM in Gradle 5.0+

ppkarwasz commented on code in PR #1141:
URL: https://github.com/apache/logging-log4j2/pull/1141#discussion_r1022085759


##########
src/site/markdown/maven-artifacts.md.vm:
##########
@@ -149,14 +149,29 @@ file. When you specify the version identifier in this section, you don't have to
 </dependencyManagement>
 ```
 
-To use this with Gradle, an additional [Gradle plugin](https://github.com/spring-gradle-plugins/dependency-management-plugin)
+Gradle 5.0+ supports importing Maven BOM as a [platform](https://docs.gradle.org/current/userguide/platforms.html#sub:bom_import)
+to align dependency versions.
+
+`build.gradle`
+
+```
+dependencies {
+  implementation platform('org.apache.logging.log4j:log4j-bom:${Log4jReleaseVersion}')
+
+  implementation 'org.apache.logging.log4j:log4j-api'
+  implementation 'org.apache.logging.log4j:log4j-core'

Review Comment:
   I would use `runtime` as scope for `log4j-core`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org