{"action":"created","comment":{"url":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/comments/45563624","id":45563624,"diff_hunk":"@@ -61,16 +69,46 @@ repositories {\n     mavenCentral()\n }\n \n+// Write the plugin's classpath to a file to share with the tests\n+task createClasspathManifest {\n+  def outputDir = file(\"$buildDir/$name\")\n+\n+  inputs.files sourceSets.main.runtimeClasspath\n+  outputs.dir outputDir\n+\n+  doLast {\n+    outputDir.mkdirs()\n+    file(\"$outputDir/plugin-classpath.txt\").text = sourceSets.main.runtimeClasspath.join(\"\\n\")\n+  }\n+}\n+\n+tasks.test.dependsOn tasks.createClasspathManifest\n+if (findProject(':vendor') != null) {","path":"build.gradle","position":38,"original_position":38,"commit_id":"798b4c427e0994b9a9121f80e78a5d3df7f6cbcf","original_commit_id":"798b4c427e0994b9a9121f80e78a5d3df7f6cbcf","user":{"login":"zhangkun83","id":9053690,"avatar_url":"https://avatars.githubusercontent.com/u/9053690?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangkun83","html_url":"https://github.com/zhangkun83","followers_url":"https://api.github.com/users/zhangkun83/followers","following_url":"https://api.github.com/users/zhangkun83/following{/other_user}","gists_url":"https://api.github.com/users/zhangkun83/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangkun83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangkun83/subscriptions","organizations_url":"https://api.github.com/users/zhangkun83/orgs","repos_url":"https://api.github.com/users/zhangkun83/repos","events_url":"https://api.github.com/users/zhangkun83/events{/privacy}","received_events_url":"https://api.github.com/users/zhangkun83/received_events","type":"User","site_admin":false},"body":"This if-block can be reduced to just one line:\r\n```\r\ntasks.test.dependsOn \"vendor:protocExecutable\",\r\n    \"vendor:protobufStaticLibrary\", \"vendor:protobufLiteStaticLibrary\"\r\n```","created_at":"2015-11-22T20:04:54Z","updated_at":"2015-11-22T20:04:54Z","html_url":"https://github.com/google/protobuf-gradle-plugin/pull/44#discussion_r45563624","pull_request_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/comments/45563624"},"html":{"href":"https://github.com/google/protobuf-gradle-plugin/pull/44#discussion_r45563624"},"pull_request":{"href":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/44","id":46501869,"html_url":"https://github.com/google/protobuf-gradle-plugin/pull/44","diff_url":"https://github.com/google/protobuf-gradle-plugin/pull/44.diff","patch_url":"https://github.com/google/protobuf-gradle-plugin/pull/44.patch","issue_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/44","number":44,"state":"open","locked":false,"title":"Initial support of Gradle's model for C++","user":{"login":"Shad0w1nk","id":1980084,"avatar_url":"https://avatars.githubusercontent.com/u/1980084?v=3","gravatar_id":"","url":"https://api.github.com/users/Shad0w1nk","html_url":"https://github.com/Shad0w1nk","followers_url":"https://api.github.com/users/Shad0w1nk/followers","following_url":"https://api.github.com/users/Shad0w1nk/following{/other_user}","gists_url":"https://api.github.com/users/Shad0w1nk/gists{/gist_id}","starred_url":"https://api.github.com/users/Shad0w1nk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shad0w1nk/subscriptions","organizations_url":"https://api.github.com/users/Shad0w1nk/orgs","repos_url":"https://api.github.com/users/Shad0w1nk/repos","events_url":"https://api.github.com/users/Shad0w1nk/events{/privacy}","received_events_url":"https://api.github.com/users/Shad0w1nk/received_events","type":"User","site_admin":false},"body":"This is the first step toward supporting the new model in Gradle. More works need to be done to better integrate the code with the Java plugin, however it was starting to be a bit intrusive and I wanted to cut a release and keep working on the detail later. This pull request contains the following:\r\n - Upgrade the wrapper to the latest release, Gradle 2.7\r\n - tools in ProtobufConfigurator was changed to protected as it should not be available to the public but seems to be needed in the model. How the extension is registered differ from Java which make the statement protobuf.tools.resolve() fail in the model as the member variable is private. A better way for fixing this problem should be implemented.\r\n - The ProtobufPlugin class was modified to choose between the Java/Android or model (c++) implementation. As much code as possible was shared between both world meaning we are reusing the task and the convention. Unfortunately, the source set use a separate class in order to support the model.\r\n - Integration test were added using TestKit available in the latest Gradle. Some wiring of tasks had to be done according to the documentation.\r\n - A submodule to a release version of Protobuf was added to make the C++ work without having to do any kung fun with installing library. Gradle will build protoc and protobuf library from source and use them in the example project and Gradle TestKit. All the wiring of the building has been done so executing \"./gradlew test\" will automatically build the necessary protobuf binary. As long as gcc (linux), clang (mac os) and msvc 2013 (windows) is installed, everything will work out of the box. A check has been added if someone forgot to sync the submodule.\r\n\r\nWhat's the next step? The logic for building protobuf is a bit different then the legacy Java as the model does add some flexibility that needs to be taken into account (see the integration test for example of what can be done). Some discussion and more work will need to be done in order to prepare the Java plugin for the model and integrate more code with that plugin.\r\n\r\nAny input is welcome and I will fix anything that need to be fixed.","created_at":"2015-10-01T09:29:30Z","updated_at":"2015-11-22T20:04:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6962fcbdcc464f4017327656b8096eb9561d4504","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/44/commits","review_comments_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/44/comments","review_comment_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/44/comments","statuses_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/statuses/798b4c427e0994b9a9121f80e78a5d3df7f6cbcf","head":{"label":"Shad0w1nk:native","ref":"native","sha":"798b4c427e0994b9a9121f80e78a5d3df7f6cbcf","user":{"login":"Shad0w1nk","id":1980084,"avatar_url":"https://avatars.githubusercontent.com/u/1980084?v=3","gravatar_id":"","url":"https://api.github.com/users/Shad0w1nk","html_url":"https://github.com/Shad0w1nk","followers_url":"https://api.github.com/users/Shad0w1nk/followers","following_url":"https://api.github.com/users/Shad0w1nk/following{/other_user}","gists_url":"https://api.github.com/users/Shad0w1nk/gists{/gist_id}","starred_url":"https://api.github.com/users/Shad0w1nk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shad0w1nk/subscriptions","organizations_url":"https://api.github.com/users/Shad0w1nk/orgs","repos_url":"https://api.github.com/users/Shad0w1nk/repos","events_url":"https://api.github.com/users/Shad0w1nk/events{/privacy}","received_events_url":"https://api.github.com/users/Shad0w1nk/received_events","type":"User","site_admin":false},"repo":{"id":43487356,"name":"protobuf-gradle-plugin-1","full_name":"Shad0w1nk/protobuf-gradle-plugin-1","owner":{"login":"Shad0w1nk","id":1980084,"avatar_url":"https://avatars.githubusercontent.com/u/1980084?v=3","gravatar_id":"","url":"https://api.github.com/users/Shad0w1nk","html_url":"https://github.com/Shad0w1nk","followers_url":"https://api.github.com/users/Shad0w1nk/followers","following_url":"https://api.github.com/users/Shad0w1nk/following{/other_user}","gists_url":"https://api.github.com/users/Shad0w1nk/gists{/gist_id}","starred_url":"https://api.github.com/users/Shad0w1nk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shad0w1nk/subscriptions","organizations_url":"https://api.github.com/users/Shad0w1nk/orgs","repos_url":"https://api.github.com/users/Shad0w1nk/repos","events_url":"https://api.github.com/users/Shad0w1nk/events{/privacy}","received_events_url":"https://api.github.com/users/Shad0w1nk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Shad0w1nk/protobuf-gradle-plugin-1","description":"Protobuf Plugin for Gradle","fork":true,"url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1","forks_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/forks","keys_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/teams","hooks_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/hooks","issue_events_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/issues/events{/number}","events_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/events","assignees_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/assignees{/user}","branches_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/branches{/branch}","tags_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/tags","blobs_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/statuses/{sha}","languages_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/languages","stargazers_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/stargazers","contributors_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/contributors","subscribers_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/subscribers","subscription_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/subscription","commits_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/contents/{+path}","compare_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/merges","archive_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/downloads","issues_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/issues{/number}","pulls_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/pulls{/number}","milestones_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/milestones{/number}","notifications_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/labels{/name}","releases_url":"https://api.github.com/repos/Shad0w1nk/protobuf-gradle-plugin-1/releases{/id}","created_at":"2015-10-01T09:05:03Z","updated_at":"2015-10-01T09:05:04Z","pushed_at":"2015-11-17T10:32:30Z","git_url":"git://github.com/Shad0w1nk/protobuf-gradle-plugin-1.git","ssh_url":"git@github.com:Shad0w1nk/protobuf-gradle-plugin-1.git","clone_url":"https://github.com/Shad0w1nk/protobuf-gradle-plugin-1.git","svn_url":"https://github.com/Shad0w1nk/protobuf-gradle-plugin-1","homepage":"","size":551,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"2a2f4e09e7ad54b1539053a0392dd3e8ef2ae551","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":33881870,"name":"protobuf-gradle-plugin","full_name":"google/protobuf-gradle-plugin","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/protobuf-gradle-plugin","description":"Protobuf Plugin for Gradle","fork":false,"url":"https://api.github.com/repos/google/protobuf-gradle-plugin","forks_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/forks","keys_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/teams","hooks_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/hooks","issue_events_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/events","assignees_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/tags","blobs_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/languages","stargazers_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/stargazers","contributors_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/contributors","subscribers_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/subscribers","subscription_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/subscription","commits_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/merges","archive_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/downloads","issues_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/labels{/name}","releases_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/releases{/id}","created_at":"2015-04-13T17:06:00Z","updated_at":"2015-11-19T15:01:28Z","pushed_at":"2015-11-17T10:32:31Z","git_url":"git://github.com/google/protobuf-gradle-plugin.git","ssh_url":"git@github.com:google/protobuf-gradle-plugin.git","clone_url":"https://github.com/google/protobuf-gradle-plugin.git","svn_url":"https://github.com/google/protobuf-gradle-plugin","homepage":"","size":1210,"stargazers_count":56,"watchers_count":56,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":12,"forks":9,"open_issues":12,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/44"},"html":{"href":"https://github.com/google/protobuf-gradle-plugin/pull/44"},"issue":{"href":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/44"},"comments":{"href":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/protobuf-gradle-plugin/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/google/protobuf-gradle-plugin/statuses/798b4c427e0994b9a9121f80e78a5d3df7f6cbcf"}}}}