{"action":"created","comment":{"url":"https://api.github.com/repos/gradle/gradle/pulls/comments/109605842","pull_request_review_id":30717051,"id":109605842,"diff_hunk":"@@ -102,19 +107,28 @@ public PluginContainer getPluginContainer() {\n \n     @Override\n     public void apply(PluginImplementation<?> plugin) {\n-        doApply(plugin);\n+        doApplyThroughBuildOperation(plugin);\n     }\n \n     public void apply(String pluginId) {\n         PluginImplementation<?> plugin = pluginRegistry.lookup(DefaultPluginId.unvalidated(pluginId));\n         if (plugin == null) {\n             throw new UnknownPluginException(\"Plugin with id '\" + pluginId + \"' not found.\");\n         }\n-        doApply(plugin);\n+        doApplyThroughBuildOperation(plugin);\n     }\n \n     public void apply(Class<?> type) {\n-        doApply(pluginRegistry.inspect(type));\n+        doApplyThroughBuildOperation(pluginRegistry.inspect(type));\n+    }\n+\n+    private void doApplyThroughBuildOperation(final PluginImplementation<?> plugin) {\n+        new ApplyPluginBuildOperation(plugin, buildOperationExecutor).run(new Action<BuildOperationContext>() {\n+            @Override\n+            public void execute(BuildOperationContext buildOperationContext) {\n+                doApply(plugin);","path":"subprojects/core/src/main/java/org/gradle/api/internal/plugins/DefaultPluginManager.java","position":null,"original_position":60,"commit_id":"de275793dee72a0b9ed2f122b7eb13fccee78c5c","original_commit_id":"7ba23322ad549ae846adc04dcff95ac245017f8d","user":{"login":"jjohannes","id":1963746,"avatar_url":"https://avatars3.githubusercontent.com/u/1963746?v=3","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":"Changed in https://github.com/gradle/gradle/pull/1033/commits/de275793dee72a0b9ed2f122b7eb13fccee78c5c\r\n\r\nit is now wrapping everything in the `if (adder != null)` block from inside `doAplly()`.","created_at":"2017-04-04T08:40:38Z","updated_at":"2017-04-04T08:40:38Z","html_url":"https://github.com/gradle/gradle/pull/1033#discussion_r109605842","pull_request_url":"https://api.github.com/repos/gradle/gradle/pulls/1033","_links":{"self":{"href":"https://api.github.com/repos/gradle/gradle/pulls/comments/109605842"},"html":{"href":"https://github.com/gradle/gradle/pull/1033#discussion_r109605842"},"pull_request":{"href":"https://api.github.com/repos/gradle/gradle/pulls/1033"}}},"pull_request":{"url":"https://api.github.com/repos/gradle/gradle/pulls/1033","id":98444579,"html_url":"https://github.com/gradle/gradle/pull/1033","diff_url":"https://github.com/gradle/gradle/pull/1033.diff","patch_url":"https://github.com/gradle/gradle/pull/1033.patch","issue_url":"https://api.github.com/repos/gradle/gradle/issues/1033","number":1033,"state":"open","locked":false,"title":"Plugin application is a build operation","user":{"login":"eskatos","id":132773,"avatar_url":"https://avatars0.githubusercontent.com/u/132773?v=3","gravatar_id":"","url":"https://api.github.com/users/eskatos","html_url":"https://github.com/eskatos","followers_url":"https://api.github.com/users/eskatos/followers","following_url":"https://api.github.com/users/eskatos/following{/other_user}","gists_url":"https://api.github.com/users/eskatos/gists{/gist_id}","starred_url":"https://api.github.com/users/eskatos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eskatos/subscriptions","organizations_url":"https://api.github.com/users/eskatos/orgs","repos_url":"https://api.github.com/users/eskatos/repos","events_url":"https://api.github.com/users/eskatos/events{/privacy}","received_events_url":"https://api.github.com/users/eskatos/received_events","type":"User","site_admin":false},"body":"Emit build operation events around each plugin application.\r\n\r\nCombined with the existing dependency resolution events, allows to correlate plugins and resolutions.\r\n\r\nBlocked by #1527 ","created_at":"2016-12-17T13:50:43Z","updated_at":"2017-04-04T08:40:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85ec547ab468fc98cedb44d2138f24a6672c1687","assignee":{"login":"jjohannes","id":1963746,"avatar_url":"https://avatars3.githubusercontent.com/u/1963746?v=3","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://avatars3.githubusercontent.com/u/1963746?v=3","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}],"milestone":null,"commits_url":"https://api.github.com/repos/gradle/gradle/pulls/1033/commits","review_comments_url":"https://api.github.com/repos/gradle/gradle/pulls/1033/comments","review_comment_url":"https://api.github.com/repos/gradle/gradle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gradle/gradle/issues/1033/comments","statuses_url":"https://api.github.com/repos/gradle/gradle/statuses/de275793dee72a0b9ed2f122b7eb13fccee78c5c","head":{"label":"gradle:pm-apply-plugin-build-op","ref":"pm-apply-plugin-build-op","sha":"de275793dee72a0b9ed2f122b7eb13fccee78c5c","user":{"login":"gradle","id":124156,"avatar_url":"https://avatars1.githubusercontent.com/u/124156?v=3","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://avatars1.githubusercontent.com/u/124156?v=3","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":"2017-04-04T06:08:15Z","pushed_at":"2017-04-04T08:38:48Z","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":162001,"stargazers_count":4677,"watchers_count":4677,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":1717,"mirror_url":null,"open_issues_count":502,"forks":1717,"open_issues":502,"watchers":4677,"default_branch":"master"}},"base":{"label":"gradle:master","ref":"master","sha":"119411eba06f3a459f0ba53c0ca882a48a4b7b5e","user":{"login":"gradle","id":124156,"avatar_url":"https://avatars1.githubusercontent.com/u/124156?v=3","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://avatars1.githubusercontent.com/u/124156?v=3","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":"2017-04-04T06:08:15Z","pushed_at":"2017-04-04T08:38:48Z","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":162001,"stargazers_count":4677,"watchers_count":4677,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":1717,"mirror_url":null,"open_issues_count":502,"forks":1717,"open_issues":502,"watchers":4677,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gradle/gradle/pulls/1033"},"html":{"href":"https://github.com/gradle/gradle/pull/1033"},"issue":{"href":"https://api.github.com/repos/gradle/gradle/issues/1033"},"comments":{"href":"https://api.github.com/repos/gradle/gradle/issues/1033/comments"},"review_comments":{"href":"https://api.github.com/repos/gradle/gradle/pulls/1033/comments"},"review_comment":{"href":"https://api.github.com/repos/gradle/gradle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gradle/gradle/pulls/1033/commits"},"statuses":{"href":"https://api.github.com/repos/gradle/gradle/statuses/de275793dee72a0b9ed2f122b7eb13fccee78c5c"}}}}
{"actor":{"display_login":"jjohannes"}}