{"action":"created","comment":{"url":"https://api.github.com/repos/gradle/gradle/pulls/comments/165786195","pull_request_review_id":93786263,"id":165786195,"diff_hunk":"@@ -21,9 +21,35 @@ With [dependency constraints](userguide/managing_transitive_dependencies.html#se\n \n In the example, the version of `commons-codec` that is brought in transitively is `1.9`. With the constraint, we express that we need at lease `1.11` and Gradle will now pick that version during dependency resolution.\n \n-### Advanced POM support (preview)\n+### Improved POM support: optional dependencies\n \n-Gradle now supports [additional features for modules with POM metadata](https://github.com/gradle/gradle/blob/master/subprojects/dependency-management/preview-features.adoc). This includes support for _optional dependencies_, _BOM import_ and _compile/runtime scope separation_. \n+Gradle now creates a dependency constraint for each dependency declaration in a POM file with `<optional>true</optional>`. This constraint will produce the expected result for an optional dependency: if the dependency module is brought in by another, non-optional, dependency declaration, then the constraint will apply when choosing the version for that dependency (e.g., if the optional dependency defines a higher version, that one is chosen).\n+\n+_Note:_ This is a _Gradle 5.0 feature preview_, which means it is a potentially breaking change that will be activated by default in Gradle 5.0. It can be turned on in Gradle 4.6+ by setting `org.gradle.advancedpomsupport=true` in _gradle.properties_.\n+\n+### Improved POM support: BOM import\n+\n+Gradle now [provides support](userguide/managing_transitive_dependencies.html#sec:bom_import) for importing [bill of materials (BOM) files](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies), which are effectively `.pom` files that use `<dependencyManagement>` to control the dependency versions of direct and transitive dependencies. It works by declaring a dependency on a BOM.\n+\n+    dependencies {","path":"subprojects/docs/src/docs/release/notes.md","position":16,"original_position":16,"commit_id":"c21a90bf43345bbe53e600cc1b6949a1df9a87a0","original_commit_id":"c21a90bf43345bbe53e600cc1b6949a1df9a87a0","user":{"login":"bmuschko","id":440872,"avatar_url":"https://avatars2.githubusercontent.com/u/440872?v=4","gravatar_id":"","url":"https://api.github.com/users/bmuschko","html_url":"https://github.com/bmuschko","followers_url":"https://api.github.com/users/bmuschko/followers","following_url":"https://api.github.com/users/bmuschko/following{/other_user}","gists_url":"https://api.github.com/users/bmuschko/gists{/gist_id}","starred_url":"https://api.github.com/users/bmuschko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmuschko/subscriptions","organizations_url":"https://api.github.com/users/bmuschko/orgs","repos_url":"https://api.github.com/users/bmuschko/repos","events_url":"https://api.github.com/users/bmuschko/events{/privacy}","received_events_url":"https://api.github.com/users/bmuschko/received_events","type":"User","site_admin":false},"body":"Is the BOM automatically resolved when declaring a module or does a user need to directly point to it? It's not clear from the example. I am assuming the first dependency declaration _is_ the BOM. Might be worth adding an inline comment in the code.","created_at":"2018-02-02T23:24:09Z","updated_at":"2018-02-02T23:36:41Z","html_url":"https://github.com/gradle/gradle/pull/4246#discussion_r165786195","pull_request_url":"https://api.github.com/repos/gradle/gradle/pulls/4246","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/gradle/gradle/pulls/comments/165786195"},"html":{"href":"https://github.com/gradle/gradle/pull/4246#discussion_r165786195"},"pull_request":{"href":"https://api.github.com/repos/gradle/gradle/pulls/4246"}}},"pull_request":{"url":"https://api.github.com/repos/gradle/gradle/pulls/4246","id":166748129,"html_url":"https://github.com/gradle/gradle/pull/4246","diff_url":"https://github.com/gradle/gradle/pull/4246.diff","patch_url":"https://github.com/gradle/gradle/pull/4246.patch","issue_url":"https://api.github.com/repos/gradle/gradle/issues/4246","number":4246,"state":"open","locked":false,"title":"Move content from feature preview document to user guide","user":{"login":"jjohannes","id":1963746,"avatar_url":"https://avatars0.githubusercontent.com/u/1963746?v=4","gravatar_id":"","url":"https://api.github.com/users/jjohannes","html_url":"https://github.com/jjohannes","followers_url":"https://api.github.com/users/jjohannes/followers","following_url":"https://api.github.com/users/jjohannes/following{/other_user}","gists_url":"https://api.github.com/users/jjohannes/gists{/gist_id}","starred_url":"https://api.github.com/users/jjohannes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjohannes/subscriptions","organizations_url":"https://api.github.com/users/jjohannes/orgs","repos_url":"https://api.github.com/users/jjohannes/repos","events_url":"https://api.github.com/users/jjohannes/events{/privacy}","received_events_url":"https://api.github.com/users/jjohannes/received_events","type":"User","site_admin":false},"body":"To make it sustainable and easy to discover for users. The content\r\nis reworded to fit into the existing documentation and with the new\r\nterminology definitions. Some explanations are moved to the release\r\nnotes, which previously linked to the preview document, to better\r\nillustrate the features there.\r\n\r\nFeatures documented:\r\n- optional dependencies\r\n- BOM support\r\n- compile/runtime scope separation\r\n- metadata sources (was already added to documentation earlier,\r\n  therefore it can also be removed from the preview doc)\r\n","created_at":"2018-02-02T08:57:31Z","updated_at":"2018-02-02T23:36:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca9f324dfbfed0adeb8e2820bc9cca2708aa6298","assignee":{"login":"jjohannes","id":1963746,"avatar_url":"https://avatars0.githubusercontent.com/u/1963746?v=4","gravatar_id":"","url":"https://api.github.com/users/jjohannes","html_url":"https://github.com/jjohannes","followers_url":"https://api.github.com/users/jjohannes/followers","following_url":"https://api.github.com/users/jjohannes/following{/other_user}","gists_url":"https://api.github.com/users/jjohannes/gists{/gist_id}","starred_url":"https://api.github.com/users/jjohannes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjohannes/subscriptions","organizations_url":"https://api.github.com/users/jjohannes/orgs","repos_url":"https://api.github.com/users/jjohannes/repos","events_url":"https://api.github.com/users/jjohannes/events{/privacy}","received_events_url":"https://api.github.com/users/jjohannes/received_events","type":"User","site_admin":false},"assignees":[{"login":"jjohannes","id":1963746,"avatar_url":"https://avatars0.githubusercontent.com/u/1963746?v=4","gravatar_id":"","url":"https://api.github.com/users/jjohannes","html_url":"https://github.com/jjohannes","followers_url":"https://api.github.com/users/jjohannes/followers","following_url":"https://api.github.com/users/jjohannes/following{/other_user}","gists_url":"https://api.github.com/users/jjohannes/gists{/gist_id}","starred_url":"https://api.github.com/users/jjohannes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjohannes/subscriptions","organizations_url":"https://api.github.com/users/jjohannes/orgs","repos_url":"https://api.github.com/users/jjohannes/repos","events_url":"https://api.github.com/users/jjohannes/events{/privacy}","received_events_url":"https://api.github.com/users/jjohannes/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/gradle/gradle/pulls/4246/commits","review_comments_url":"https://api.github.com/repos/gradle/gradle/pulls/4246/comments","review_comment_url":"https://api.github.com/repos/gradle/gradle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gradle/gradle/issues/4246/comments","statuses_url":"https://api.github.com/repos/gradle/gradle/statuses/c21a90bf43345bbe53e600cc1b6949a1df9a87a0","head":{"label":"gradle:jjohannes/dependency-management/doc-pom-support","ref":"jjohannes/dependency-management/doc-pom-support","sha":"c21a90bf43345bbe53e600cc1b6949a1df9a87a0","user":{"login":"gradle","id":124156,"avatar_url":"https://avatars2.githubusercontent.com/u/124156?v=4","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"repo":{"id":302322,"name":"gradle","full_name":"gradle/gradle","owner":{"login":"gradle","id":124156,"avatar_url":"https://avatars2.githubusercontent.com/u/124156?v=4","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gradle/gradle","description":"Adaptable, fast automation for all","fork":false,"url":"https://api.github.com/repos/gradle/gradle","forks_url":"https://api.github.com/repos/gradle/gradle/forks","keys_url":"https://api.github.com/repos/gradle/gradle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gradle/gradle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gradle/gradle/teams","hooks_url":"https://api.github.com/repos/gradle/gradle/hooks","issue_events_url":"https://api.github.com/repos/gradle/gradle/issues/events{/number}","events_url":"https://api.github.com/repos/gradle/gradle/events","assignees_url":"https://api.github.com/repos/gradle/gradle/assignees{/user}","branches_url":"https://api.github.com/repos/gradle/gradle/branches{/branch}","tags_url":"https://api.github.com/repos/gradle/gradle/tags","blobs_url":"https://api.github.com/repos/gradle/gradle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gradle/gradle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gradle/gradle/git/refs{/sha}","trees_url":"https://api.github.com/repos/gradle/gradle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gradle/gradle/statuses/{sha}","languages_url":"https://api.github.com/repos/gradle/gradle/languages","stargazers_url":"https://api.github.com/repos/gradle/gradle/stargazers","contributors_url":"https://api.github.com/repos/gradle/gradle/contributors","subscribers_url":"https://api.github.com/repos/gradle/gradle/subscribers","subscription_url":"https://api.github.com/repos/gradle/gradle/subscription","commits_url":"https://api.github.com/repos/gradle/gradle/commits{/sha}","git_commits_url":"https://api.github.com/repos/gradle/gradle/git/commits{/sha}","comments_url":"https://api.github.com/repos/gradle/gradle/comments{/number}","issue_comment_url":"https://api.github.com/repos/gradle/gradle/issues/comments{/number}","contents_url":"https://api.github.com/repos/gradle/gradle/contents/{+path}","compare_url":"https://api.github.com/repos/gradle/gradle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gradle/gradle/merges","archive_url":"https://api.github.com/repos/gradle/gradle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gradle/gradle/downloads","issues_url":"https://api.github.com/repos/gradle/gradle/issues{/number}","pulls_url":"https://api.github.com/repos/gradle/gradle/pulls{/number}","milestones_url":"https://api.github.com/repos/gradle/gradle/milestones{/number}","notifications_url":"https://api.github.com/repos/gradle/gradle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gradle/gradle/labels{/name}","releases_url":"https://api.github.com/repos/gradle/gradle/releases{/id}","deployments_url":"https://api.github.com/repos/gradle/gradle/deployments","created_at":"2009-09-09T18:27:19Z","updated_at":"2018-02-02T21:48:56Z","pushed_at":"2018-02-02T23:35:18Z","git_url":"git://github.com/gradle/gradle.git","ssh_url":"git@github.com:gradle/gradle.git","clone_url":"https://github.com/gradle/gradle.git","svn_url":"https://github.com/gradle/gradle","homepage":"https://gradle.org","size":197042,"stargazers_count":6206,"watchers_count":6206,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":2033,"mirror_url":null,"archived":false,"open_issues_count":903,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2033,"open_issues":903,"watchers":6206,"default_branch":"master"}},"base":{"label":"gradle:master","ref":"master","sha":"bb566c460eb4c77296f7e57633b65e55ddd0913f","user":{"login":"gradle","id":124156,"avatar_url":"https://avatars2.githubusercontent.com/u/124156?v=4","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"repo":{"id":302322,"name":"gradle","full_name":"gradle/gradle","owner":{"login":"gradle","id":124156,"avatar_url":"https://avatars2.githubusercontent.com/u/124156?v=4","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gradle/gradle","description":"Adaptable, fast automation for all","fork":false,"url":"https://api.github.com/repos/gradle/gradle","forks_url":"https://api.github.com/repos/gradle/gradle/forks","keys_url":"https://api.github.com/repos/gradle/gradle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gradle/gradle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gradle/gradle/teams","hooks_url":"https://api.github.com/repos/gradle/gradle/hooks","issue_events_url":"https://api.github.com/repos/gradle/gradle/issues/events{/number}","events_url":"https://api.github.com/repos/gradle/gradle/events","assignees_url":"https://api.github.com/repos/gradle/gradle/assignees{/user}","branches_url":"https://api.github.com/repos/gradle/gradle/branches{/branch}","tags_url":"https://api.github.com/repos/gradle/gradle/tags","blobs_url":"https://api.github.com/repos/gradle/gradle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gradle/gradle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gradle/gradle/git/refs{/sha}","trees_url":"https://api.github.com/repos/gradle/gradle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gradle/gradle/statuses/{sha}","languages_url":"https://api.github.com/repos/gradle/gradle/languages","stargazers_url":"https://api.github.com/repos/gradle/gradle/stargazers","contributors_url":"https://api.github.com/repos/gradle/gradle/contributors","subscribers_url":"https://api.github.com/repos/gradle/gradle/subscribers","subscription_url":"https://api.github.com/repos/gradle/gradle/subscription","commits_url":"https://api.github.com/repos/gradle/gradle/commits{/sha}","git_commits_url":"https://api.github.com/repos/gradle/gradle/git/commits{/sha}","comments_url":"https://api.github.com/repos/gradle/gradle/comments{/number}","issue_comment_url":"https://api.github.com/repos/gradle/gradle/issues/comments{/number}","contents_url":"https://api.github.com/repos/gradle/gradle/contents/{+path}","compare_url":"https://api.github.com/repos/gradle/gradle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gradle/gradle/merges","archive_url":"https://api.github.com/repos/gradle/gradle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gradle/gradle/downloads","issues_url":"https://api.github.com/repos/gradle/gradle/issues{/number}","pulls_url":"https://api.github.com/repos/gradle/gradle/pulls{/number}","milestones_url":"https://api.github.com/repos/gradle/gradle/milestones{/number}","notifications_url":"https://api.github.com/repos/gradle/gradle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gradle/gradle/labels{/name}","releases_url":"https://api.github.com/repos/gradle/gradle/releases{/id}","deployments_url":"https://api.github.com/repos/gradle/gradle/deployments","created_at":"2009-09-09T18:27:19Z","updated_at":"2018-02-02T21:48:56Z","pushed_at":"2018-02-02T23:35:18Z","git_url":"git://github.com/gradle/gradle.git","ssh_url":"git@github.com:gradle/gradle.git","clone_url":"https://github.com/gradle/gradle.git","svn_url":"https://github.com/gradle/gradle","homepage":"https://gradle.org","size":197042,"stargazers_count":6206,"watchers_count":6206,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":2033,"mirror_url":null,"archived":false,"open_issues_count":903,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2033,"open_issues":903,"watchers":6206,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gradle/gradle/pulls/4246"},"html":{"href":"https://github.com/gradle/gradle/pull/4246"},"issue":{"href":"https://api.github.com/repos/gradle/gradle/issues/4246"},"comments":{"href":"https://api.github.com/repos/gradle/gradle/issues/4246/comments"},"review_comments":{"href":"https://api.github.com/repos/gradle/gradle/pulls/4246/comments"},"review_comment":{"href":"https://api.github.com/repos/gradle/gradle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gradle/gradle/pulls/4246/commits"},"statuses":{"href":"https://api.github.com/repos/gradle/gradle/statuses/c21a90bf43345bbe53e600cc1b6949a1df9a87a0"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"bmuschko"}}