GitHub PullRequestReviewCommentEvent at 2014-11-11 18:40:27
Repository: kotlin
Actor: abesto
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/JetBrains/kotlin/pulls/comments/20170117","id":20170117,"diff_hunk":"@@ -71,48 +90,72 @@ public open class KotlinCompile(): AbstractCompile() {\n \n     [TaskAction]\n     override fun compile() {\n-\n-        getLogger().debug(\"Starting Kotlin compilation task\")\n-\n-        val args = K2JVMCompilerArguments()\n-\n-        val javaSrcRoots = HashSet<File>()\n-        val sources = ArrayList<File>()\n-\n-        // collect source directory roots for all java files to allow cross compilation\n-        for (file in getSource()) {\n-            if (FilenameUtils.getExtension(file.getName()).equalsIgnoreCase(\"java\")) {\n-                val javaRoot = findSrcDirRoot(file)\n-                if (javaRoot != null) {\n-                    javaSrcRoots.add(javaRoot)\n-                }\n-            } else {\n-                sources.add(file)\n-            }\n-        }\n-\n+        getLogger().debug(\"Starting ${javaClass} task\")\n+        val args = createBlankArgs()\n+        val sources = getKotlinSources()\n         if (sources.empty) {\n             getLogger().warn(\"No Kotlin files found, skipping Kotlin compiler task\")\n             return\n         }\n \n+        populateTargetSpecificArgs(args, sources)\n+        populateCommonArgs(args, sources)\n+        callCompiler(args)\n+        afterCompileHook(args)\n+    }\n+\n+    protected fun isJava(it: File): Boolean = FilenameUtils.getExtension(it.getName()).equalsIgnoreCase(\"java\")\n+\n+    private fun getKotlinSources(): ArrayList<File> = getSource()\n+            .filterNot { isJava(it) }","path":"libraries/tools/kotlin-gradle-plugin-core/src/main/kotlin/org/jetbrains/kotlin/gradle/tasks/Tasks.kt","position":null,"original_position":88,"commit_id":"6a0cc018298d7f9ac3cd45500a29eafeea59562b","original_commit_id":"772b4120aebbb3c78b796d9fce80d044d5334c73","user":{"login":"abesto","id":59982,"avatar_url":"https://avatars.githubusercontent.com/u/59982?v=3","gravatar_id":"","url":"https://api.github.com/users/abesto","html_url":"https://github.com/abesto","followers_url":"https://api.github.com/users/abesto/followers","following_url":"https://api.github.com/users/abesto/following{/other_user}","gists_url":"https://api.github.com/users/abesto/gists{/gist_id}","starred_url":"https://api.github.com/users/abesto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abesto/subscriptions","organizations_url":"https://api.github.com/users/abesto/orgs","repos_url":"https://api.github.com/users/abesto/repos","events_url":"https://api.github.com/users/abesto/events{/privacy}","received_events_url":"https://api.github.com/users/abesto/received_events","type":"User","site_admin":false},"body":"`JavaFileType` has slightly different constants, so I used the common interface to make the symmetry obvious.","created_at":"2014-11-11T18:40:27Z","updated_at":"2014-11-11T18:40:27Z","html_url":"https://github.com/JetBrains/kotlin/pull/524#discussion_r20170117","pull_request_url":"https://api.github.com/repos/JetBrains/kotlin/pulls/524","_links":{"self":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/comments/20170117"},"html":{"href":"https://github.com/JetBrains/kotlin/pull/524#discussion_r20170117"},"pull_request":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/524"}}},"pull_request":{"url":"https://api.github.com/repos/JetBrains/kotlin/pulls/524","id":24011248,"html_url":"https://github.com/JetBrains/kotlin/pull/524","diff_url":"https://github.com/JetBrains/kotlin/pull/524.diff","patch_url":"https://github.com/JetBrains/kotlin/pull/524.patch","issue_url":"https://api.github.com/repos/JetBrains/kotlin/issues/524","number":524,"state":"open","locked":false,"title":"Kotlin2Js Gradle plugin","user":{"login":"abesto","id":59982,"avatar_url":"https://avatars.githubusercontent.com/u/59982?v=3","gravatar_id":"","url":"https://api.github.com/users/abesto","html_url":"https://github.com/abesto","followers_url":"https://api.github.com/users/abesto/followers","following_url":"https://api.github.com/users/abesto/following{/other_user}","gists_url":"https://api.github.com/users/abesto/gists{/gist_id}","starred_url":"https://api.github.com/users/abesto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abesto/subscriptions","organizations_url":"https://api.github.com/users/abesto/orgs","repos_url":"https://api.github.com/users/abesto/repos","events_url":"https://api.github.com/users/abesto/events{/privacy}","received_events_url":"https://api.github.com/users/abesto/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-11-06T20:47:05Z","updated_at":"2014-11-11T18:40:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c96a369b2e09e37adec3389285bfd74096d4e5e","assignee":{"login":"bashor","id":485321,"avatar_url":"https://avatars.githubusercontent.com/u/485321?v=3","gravatar_id":"","url":"https://api.github.com/users/bashor","html_url":"https://github.com/bashor","followers_url":"https://api.github.com/users/bashor/followers","following_url":"https://api.github.com/users/bashor/following{/other_user}","gists_url":"https://api.github.com/users/bashor/gists{/gist_id}","starred_url":"https://api.github.com/users/bashor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bashor/subscriptions","organizations_url":"https://api.github.com/users/bashor/orgs","repos_url":"https://api.github.com/users/bashor/repos","events_url":"https://api.github.com/users/bashor/events{/privacy}","received_events_url":"https://api.github.com/users/bashor/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/JetBrains/kotlin/pulls/524/commits","review_comments_url":"https://api.github.com/repos/JetBrains/kotlin/pulls/524/comments","review_comment_url":"https://api.github.com/repos/JetBrains/kotlin/pulls/comments/{number}","comments_url":"https://api.github.com/repos/JetBrains/kotlin/issues/524/comments","statuses_url":"https://api.github.com/repos/JetBrains/kotlin/statuses/6a0cc018298d7f9ac3cd45500a29eafeea59562b","head":{"label":"abesto:gradle-js","ref":"gradle-js","sha":"6a0cc018298d7f9ac3cd45500a29eafeea59562b","user":{"login":"abesto","id":59982,"avatar_url":"https://avatars.githubusercontent.com/u/59982?v=3","gravatar_id":"","url":"https://api.github.com/users/abesto","html_url":"https://github.com/abesto","followers_url":"https://api.github.com/users/abesto/followers","following_url":"https://api.github.com/users/abesto/following{/other_user}","gists_url":"https://api.github.com/users/abesto/gists{/gist_id}","starred_url":"https://api.github.com/users/abesto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abesto/subscriptions","organizations_url":"https://api.github.com/users/abesto/orgs","repos_url":"https://api.github.com/users/abesto/repos","events_url":"https://api.github.com/users/abesto/events{/privacy}","received_events_url":"https://api.github.com/users/abesto/received_events","type":"User","site_admin":false},"repo":{"id":25411269,"name":"kotlin","full_name":"abesto/kotlin","owner":{"login":"abesto","id":59982,"avatar_url":"https://avatars.githubusercontent.com/u/59982?v=3","gravatar_id":"","url":"https://api.github.com/users/abesto","html_url":"https://github.com/abesto","followers_url":"https://api.github.com/users/abesto/followers","following_url":"https://api.github.com/users/abesto/following{/other_user}","gists_url":"https://api.github.com/users/abesto/gists{/gist_id}","starred_url":"https://api.github.com/users/abesto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abesto/subscriptions","organizations_url":"https://api.github.com/users/abesto/orgs","repos_url":"https://api.github.com/users/abesto/repos","events_url":"https://api.github.com/users/abesto/events{/privacy}","received_events_url":"https://api.github.com/users/abesto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abesto/kotlin","description":"The Kotlin Programming Language","fork":true,"url":"https://api.github.com/repos/abesto/kotlin","forks_url":"https://api.github.com/repos/abesto/kotlin/forks","keys_url":"https://api.github.com/repos/abesto/kotlin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abesto/kotlin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abesto/kotlin/teams","hooks_url":"https://api.github.com/repos/abesto/kotlin/hooks","issue_events_url":"https://api.github.com/repos/abesto/kotlin/issues/events{/number}","events_url":"https://api.github.com/repos/abesto/kotlin/events","assignees_url":"https://api.github.com/repos/abesto/kotlin/assignees{/user}","branches_url":"https://api.github.com/repos/abesto/kotlin/branches{/branch}","tags_url":"https://api.github.com/repos/abesto/kotlin/tags","blobs_url":"https://api.github.com/repos/abesto/kotlin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abesto/kotlin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abesto/kotlin/git/refs{/sha}","trees_url":"https://api.github.com/repos/abesto/kotlin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abesto/kotlin/statuses/{sha}","languages_url":"https://api.github.com/repos/abesto/kotlin/languages","stargazers_url":"https://api.github.com/repos/abesto/kotlin/stargazers","contributors_url":"https://api.github.com/repos/abesto/kotlin/contributors","subscribers_url":"https://api.github.com/repos/abesto/kotlin/subscribers","subscription_url":"https://api.github.com/repos/abesto/kotlin/subscription","commits_url":"https://api.github.com/repos/abesto/kotlin/commits{/sha}","git_commits_url":"https://api.github.com/repos/abesto/kotlin/git/commits{/sha}","comments_url":"https://api.github.com/repos/abesto/kotlin/comments{/number}","issue_comment_url":"https://api.github.com/repos/abesto/kotlin/issues/comments/{number}","contents_url":"https://api.github.com/repos/abesto/kotlin/contents/{+path}","compare_url":"https://api.github.com/repos/abesto/kotlin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abesto/kotlin/merges","archive_url":"https://api.github.com/repos/abesto/kotlin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abesto/kotlin/downloads","issues_url":"https://api.github.com/repos/abesto/kotlin/issues{/number}","pulls_url":"https://api.github.com/repos/abesto/kotlin/pulls{/number}","milestones_url":"https://api.github.com/repos/abesto/kotlin/milestones{/number}","notifications_url":"https://api.github.com/repos/abesto/kotlin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abesto/kotlin/labels{/name}","releases_url":"https://api.github.com/repos/abesto/kotlin/releases{/id}","created_at":"2014-10-18T22:00:34Z","updated_at":"2014-10-18T22:01:24Z","pushed_at":"2014-11-11T18:35:08Z","git_url":"git://github.com/abesto/kotlin.git","ssh_url":"git@github.com:abesto/kotlin.git","clone_url":"https://github.com/abesto/kotlin.git","svn_url":"https://github.com/abesto/kotlin","homepage":"http://kotlinlang.org/","size":160720,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JetBrains:master","ref":"master","sha":"b39d34ca8d27bc3c33a96e1ed80f39175b47d758","user":{"login":"JetBrains","id":878437,"avatar_url":"https://avatars.githubusercontent.com/u/878437?v=3","gravatar_id":"","url":"https://api.github.com/users/JetBrains","html_url":"https://github.com/JetBrains","followers_url":"https://api.github.com/users/JetBrains/followers","following_url":"https://api.github.com/users/JetBrains/following{/other_user}","gists_url":"https://api.github.com/users/JetBrains/gists{/gist_id}","starred_url":"https://api.github.com/users/JetBrains/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JetBrains/subscriptions","organizations_url":"https://api.github.com/users/JetBrains/orgs","repos_url":"https://api.github.com/users/JetBrains/repos","events_url":"https://api.github.com/users/JetBrains/events{/privacy}","received_events_url":"https://api.github.com/users/JetBrains/received_events","type":"Organization","site_admin":false},"repo":{"id":3432266,"name":"kotlin","full_name":"JetBrains/kotlin","owner":{"login":"JetBrains","id":878437,"avatar_url":"https://avatars.githubusercontent.com/u/878437?v=3","gravatar_id":"","url":"https://api.github.com/users/JetBrains","html_url":"https://github.com/JetBrains","followers_url":"https://api.github.com/users/JetBrains/followers","following_url":"https://api.github.com/users/JetBrains/following{/other_user}","gists_url":"https://api.github.com/users/JetBrains/gists{/gist_id}","starred_url":"https://api.github.com/users/JetBrains/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JetBrains/subscriptions","organizations_url":"https://api.github.com/users/JetBrains/orgs","repos_url":"https://api.github.com/users/JetBrains/repos","events_url":"https://api.github.com/users/JetBrains/events{/privacy}","received_events_url":"https://api.github.com/users/JetBrains/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JetBrains/kotlin","description":"The Kotlin Programming Language","fork":false,"url":"https://api.github.com/repos/JetBrains/kotlin","forks_url":"https://api.github.com/repos/JetBrains/kotlin/forks","keys_url":"https://api.github.com/repos/JetBrains/kotlin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JetBrains/kotlin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JetBrains/kotlin/teams","hooks_url":"https://api.github.com/repos/JetBrains/kotlin/hooks","issue_events_url":"https://api.github.com/repos/JetBrains/kotlin/issues/events{/number}","events_url":"https://api.github.com/repos/JetBrains/kotlin/events","assignees_url":"https://api.github.com/repos/JetBrains/kotlin/assignees{/user}","branches_url":"https://api.github.com/repos/JetBrains/kotlin/branches{/branch}","tags_url":"https://api.github.com/repos/JetBrains/kotlin/tags","blobs_url":"https://api.github.com/repos/JetBrains/kotlin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JetBrains/kotlin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JetBrains/kotlin/git/refs{/sha}","trees_url":"https://api.github.com/repos/JetBrains/kotlin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JetBrains/kotlin/statuses/{sha}","languages_url":"https://api.github.com/repos/JetBrains/kotlin/languages","stargazers_url":"https://api.github.com/repos/JetBrains/kotlin/stargazers","contributors_url":"https://api.github.com/repos/JetBrains/kotlin/contributors","subscribers_url":"https://api.github.com/repos/JetBrains/kotlin/subscribers","subscription_url":"https://api.github.com/repos/JetBrains/kotlin/subscription","commits_url":"https://api.github.com/repos/JetBrains/kotlin/commits{/sha}","git_commits_url":"https://api.github.com/repos/JetBrains/kotlin/git/commits{/sha}","comments_url":"https://api.github.com/repos/JetBrains/kotlin/comments{/number}","issue_comment_url":"https://api.github.com/repos/JetBrains/kotlin/issues/comments/{number}","contents_url":"https://api.github.com/repos/JetBrains/kotlin/contents/{+path}","compare_url":"https://api.github.com/repos/JetBrains/kotlin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JetBrains/kotlin/merges","archive_url":"https://api.github.com/repos/JetBrains/kotlin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JetBrains/kotlin/downloads","issues_url":"https://api.github.com/repos/JetBrains/kotlin/issues{/number}","pulls_url":"https://api.github.com/repos/JetBrains/kotlin/pulls{/number}","milestones_url":"https://api.github.com/repos/JetBrains/kotlin/milestones{/number}","notifications_url":"https://api.github.com/repos/JetBrains/kotlin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JetBrains/kotlin/labels{/name}","releases_url":"https://api.github.com/repos/JetBrains/kotlin/releases{/id}","created_at":"2012-02-13T17:29:58Z","updated_at":"2014-11-11T08:22:04Z","pushed_at":"2014-11-11T18:20:34Z","git_url":"git://github.com/JetBrains/kotlin.git","ssh_url":"git@github.com:JetBrains/kotlin.git","clone_url":"https://github.com/JetBrains/kotlin.git","svn_url":"https://github.com/JetBrains/kotlin","homepage":"http://kotlinlang.org/","size":1105259,"stargazers_count":890,"watchers_count":890,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":193,"mirror_url":null,"open_issues_count":7,"forks":193,"open_issues":7,"watchers":890,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/524"},"html":{"href":"https://github.com/JetBrains/kotlin/pull/524"},"issue":{"href":"https://api.github.com/repos/JetBrains/kotlin/issues/524"},"comments":{"href":"https://api.github.com/repos/JetBrains/kotlin/issues/524/comments"},"review_comments":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/524/comments"},"review_comment":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/JetBrains/kotlin/pulls/524/commits"},"statuses":{"href":"https://api.github.com/repos/JetBrains/kotlin/statuses/6a0cc018298d7f9ac3cd45500a29eafeea59562b"}}}}