{"action":"created","comment":{"url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/comments/35476371","id":35476371,"diff_hunk":"@@ -0,0 +1,73 @@\n+/*\n+ * Copyright (c) 2015 the authors of j2objc-gradle (see AUTHORS file)\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package com.github.j2objccontrib.j2objcgradle.tasks\n+\n+import com.github.j2objccontrib.j2objcgradle.J2objcConfig\n+import org.gradle.api.InvalidUserDataException\n+import org.gradle.api.Project\n+import org.gradle.api.file.FileCollection\n+import org.gradle.testfixtures.ProjectBuilder\n+import org.junit.Before\n+import org.junit.Rule\n+import org.junit.Test\n+import org.junit.rules.ExpectedException\n+\n+/**\n+ * TestTask tests.\n+ */\n+class PackLibrariesTaskTest {\n+\n+    private Project proj\n+    private String j2objcHome\n+    private J2objcConfig j2objcConfig\n+\n+    @Before\n+    void setUp() {\n+        (proj, j2objcHome, j2objcConfig) = TestingUtils.setupProject(new TestingUtils.ProjectConfig(\n+                applyJavaPlugin: true,\n+                createJ2objcConfig: true\n+        ))\n+    }\n+\n+    @Test\n+    void testPackLibraries() {\n+        // Expected Activity\n+        MockProjectExec mockProjectExec = new MockProjectExec(proj, '/J2OBJC_HOME')\n+        mockProjectExec.demandDeleteAndReturn(\n+                \"$proj.projectDir/build/packedBinaries/$proj.name-j2objcStaticLibrary/iosDebug\")\n+        mockProjectExec.demandExecAndReturn(\n+                [\n+                        'xcrun',\n+                        'lipo', '-create',\n+                        '-output', \"/PROJECT_DIR/build/packedBinaries/$proj.name-j2objcStaticLibrary/iosDebug/lib$proj.name-j2objc.a\",\n+                        \"/PROJECT_DIR/build/binaries/$proj.name-j2objcStaticLibrary/ios_arm64Debug/lib$proj.name-j2objc.a\",","path":"src/test/groovy/com/github/j2objccontrib/j2objcgradle/tasks/PackLibrariesTaskTest.groovy","position":null,"original_position":57,"commit_id":"c7ec3f9cf376a996b9b3c11263f21f9278ea301e","original_commit_id":"0123f653258a5a9f294919d8cb78a9defb4690aa","user":{"login":"advayDev1","id":11729521,"avatar_url":"https://avatars.githubusercontent.com/u/11729521?v=3","gravatar_id":"","url":"https://api.github.com/users/advayDev1","html_url":"https://github.com/advayDev1","followers_url":"https://api.github.com/users/advayDev1/followers","following_url":"https://api.github.com/users/advayDev1/following{/other_user}","gists_url":"https://api.github.com/users/advayDev1/gists{/gist_id}","starred_url":"https://api.github.com/users/advayDev1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/advayDev1/subscriptions","organizations_url":"https://api.github.com/users/advayDev1/orgs","repos_url":"https://api.github.com/users/advayDev1/repos","events_url":"https://api.github.com/users/advayDev1/events{/privacy}","received_events_url":"https://api.github.com/users/advayDev1/received_events","type":"User","site_admin":false},"body":"FYI: an alternative would be\r\n```\r\nNativeCompilaton.ALL_SUPPORTED_ARCS.collect({ String arch ->\r\n\"/PROJECT_DIR/build/binaries/$proj.name-j2objcStaticLibrary/$arch}Debug/lib$proj.name-j2objc.a\" })\r\n```","created_at":"2015-07-25T00:13:54Z","updated_at":"2015-07-25T00:13:54Z","html_url":"https://github.com/j2objc-contrib/j2objc-gradle/pull/318#discussion_r35476371","pull_request_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/318","_links":{"self":{"href":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/comments/35476371"},"html":{"href":"https://github.com/j2objc-contrib/j2objc-gradle/pull/318#discussion_r35476371"},"pull_request":{"href":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/318"}}},"pull_request":{"url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/318","id":40780622,"html_url":"https://github.com/j2objc-contrib/j2objc-gradle/pull/318","diff_url":"https://github.com/j2objc-contrib/j2objc-gradle/pull/318.diff","patch_url":"https://github.com/j2objc-contrib/j2objc-gradle/pull/318.patch","issue_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/issues/318","number":318,"state":"open","locked":false,"title":"Assemble and Pack task testing","user":{"login":"brunobowden","id":679339,"avatar_url":"https://avatars.githubusercontent.com/u/679339?v=3","gravatar_id":"","url":"https://api.github.com/users/brunobowden","html_url":"https://github.com/brunobowden","followers_url":"https://api.github.com/users/brunobowden/followers","following_url":"https://api.github.com/users/brunobowden/following{/other_user}","gists_url":"https://api.github.com/users/brunobowden/gists{/gist_id}","starred_url":"https://api.github.com/users/brunobowden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunobowden/subscriptions","organizations_url":"https://api.github.com/users/brunobowden/orgs","repos_url":"https://api.github.com/users/brunobowden/repos","events_url":"https://api.github.com/users/brunobowden/events{/privacy}","received_events_url":"https://api.github.com/users/brunobowden/received_events","type":"User","site_admin":false},"body":"- AssembleSourceTask unit tests\r\n- AssembleLibrariesTask unit tests\r\n- PackLibrariesTask unit tests\r\n- MockProjectExec added demandCopyAndReturn(CopySpec closure)","created_at":"2015-07-24T14:32:01Z","updated_at":"2015-07-25T00:13:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"692faee6369f5c21fa81c94c4ef62f4d4e927a8c","assignee":{"login":"advayDev1","id":11729521,"avatar_url":"https://avatars.githubusercontent.com/u/11729521?v=3","gravatar_id":"","url":"https://api.github.com/users/advayDev1","html_url":"https://github.com/advayDev1","followers_url":"https://api.github.com/users/advayDev1/followers","following_url":"https://api.github.com/users/advayDev1/following{/other_user}","gists_url":"https://api.github.com/users/advayDev1/gists{/gist_id}","starred_url":"https://api.github.com/users/advayDev1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/advayDev1/subscriptions","organizations_url":"https://api.github.com/users/advayDev1/orgs","repos_url":"https://api.github.com/users/advayDev1/repos","events_url":"https://api.github.com/users/advayDev1/events{/privacy}","received_events_url":"https://api.github.com/users/advayDev1/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/318/commits","review_comments_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/318/comments","review_comment_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/issues/318/comments","statuses_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/statuses/c7ec3f9cf376a996b9b3c11263f21f9278ea301e","head":{"label":"brunobowden:testing","ref":"testing","sha":"c7ec3f9cf376a996b9b3c11263f21f9278ea301e","user":{"login":"brunobowden","id":679339,"avatar_url":"https://avatars.githubusercontent.com/u/679339?v=3","gravatar_id":"","url":"https://api.github.com/users/brunobowden","html_url":"https://github.com/brunobowden","followers_url":"https://api.github.com/users/brunobowden/followers","following_url":"https://api.github.com/users/brunobowden/following{/other_user}","gists_url":"https://api.github.com/users/brunobowden/gists{/gist_id}","starred_url":"https://api.github.com/users/brunobowden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunobowden/subscriptions","organizations_url":"https://api.github.com/users/brunobowden/orgs","repos_url":"https://api.github.com/users/brunobowden/repos","events_url":"https://api.github.com/users/brunobowden/events{/privacy}","received_events_url":"https://api.github.com/users/brunobowden/received_events","type":"User","site_admin":false},"repo":{"id":37033994,"name":"j2objc-gradle","full_name":"brunobowden/j2objc-gradle","owner":{"login":"brunobowden","id":679339,"avatar_url":"https://avatars.githubusercontent.com/u/679339?v=3","gravatar_id":"","url":"https://api.github.com/users/brunobowden","html_url":"https://github.com/brunobowden","followers_url":"https://api.github.com/users/brunobowden/followers","following_url":"https://api.github.com/users/brunobowden/following{/other_user}","gists_url":"https://api.github.com/users/brunobowden/gists{/gist_id}","starred_url":"https://api.github.com/users/brunobowden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunobowden/subscriptions","organizations_url":"https://api.github.com/users/brunobowden/orgs","repos_url":"https://api.github.com/users/brunobowden/repos","events_url":"https://api.github.com/users/brunobowden/events{/privacy}","received_events_url":"https://api.github.com/users/brunobowden/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brunobowden/j2objc-gradle","description":"Gradle plugin for j2objc (Java to Objective-C transpiler)","fork":true,"url":"https://api.github.com/repos/brunobowden/j2objc-gradle","forks_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/forks","keys_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/teams","hooks_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/hooks","issue_events_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/issues/events{/number}","events_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/events","assignees_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/assignees{/user}","branches_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/branches{/branch}","tags_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/tags","blobs_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/git/refs{/sha}","trees_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/statuses/{sha}","languages_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/languages","stargazers_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/stargazers","contributors_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/contributors","subscribers_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/subscribers","subscription_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/subscription","commits_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/commits{/sha}","git_commits_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/git/commits{/sha}","comments_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/comments{/number}","issue_comment_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/issues/comments{/number}","contents_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/contents/{+path}","compare_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/merges","archive_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/downloads","issues_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/issues{/number}","pulls_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/pulls{/number}","milestones_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/milestones{/number}","notifications_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/labels{/name}","releases_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/releases{/id}","created_at":"2015-06-07T22:04:38Z","updated_at":"2015-06-18T06:13:01Z","pushed_at":"2015-07-25T00:13:20Z","git_url":"git://github.com/brunobowden/j2objc-gradle.git","ssh_url":"git@github.com:brunobowden/j2objc-gradle.git","clone_url":"https://github.com/brunobowden/j2objc-gradle.git","svn_url":"https://github.com/brunobowden/j2objc-gradle","homepage":null,"size":998,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"j2objc-contrib:master","ref":"master","sha":"4328876a898217801a3f1f1167097bca35961fcc","user":{"login":"j2objc-contrib","id":12766207,"avatar_url":"https://avatars.githubusercontent.com/u/12766207?v=3","gravatar_id":"","url":"https://api.github.com/users/j2objc-contrib","html_url":"https://github.com/j2objc-contrib","followers_url":"https://api.github.com/users/j2objc-contrib/followers","following_url":"https://api.github.com/users/j2objc-contrib/following{/other_user}","gists_url":"https://api.github.com/users/j2objc-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/j2objc-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j2objc-contrib/subscriptions","organizations_url":"https://api.github.com/users/j2objc-contrib/orgs","repos_url":"https://api.github.com/users/j2objc-contrib/repos","events_url":"https://api.github.com/users/j2objc-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/j2objc-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":30206593,"name":"j2objc-gradle","full_name":"j2objc-contrib/j2objc-gradle","owner":{"login":"j2objc-contrib","id":12766207,"avatar_url":"https://avatars.githubusercontent.com/u/12766207?v=3","gravatar_id":"","url":"https://api.github.com/users/j2objc-contrib","html_url":"https://github.com/j2objc-contrib","followers_url":"https://api.github.com/users/j2objc-contrib/followers","following_url":"https://api.github.com/users/j2objc-contrib/following{/other_user}","gists_url":"https://api.github.com/users/j2objc-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/j2objc-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j2objc-contrib/subscriptions","organizations_url":"https://api.github.com/users/j2objc-contrib/orgs","repos_url":"https://api.github.com/users/j2objc-contrib/repos","events_url":"https://api.github.com/users/j2objc-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/j2objc-contrib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/j2objc-contrib/j2objc-gradle","description":"Gradle plugin for j2objc (Java to Objective-C transpiler)","fork":false,"url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle","forks_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/forks","keys_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/teams","hooks_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/hooks","issue_events_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/issues/events{/number}","events_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/events","assignees_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/assignees{/user}","branches_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/branches{/branch}","tags_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/tags","blobs_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/git/refs{/sha}","trees_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/statuses/{sha}","languages_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/languages","stargazers_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/stargazers","contributors_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/contributors","subscribers_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/subscribers","subscription_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/subscription","commits_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/commits{/sha}","git_commits_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/git/commits{/sha}","comments_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/comments{/number}","issue_comment_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/issues/comments{/number}","contents_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/contents/{+path}","compare_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/merges","archive_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/downloads","issues_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/issues{/number}","pulls_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls{/number}","milestones_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/milestones{/number}","notifications_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/labels{/name}","releases_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/releases{/id}","created_at":"2015-02-02T20:22:07Z","updated_at":"2015-07-21T02:35:13Z","pushed_at":"2015-07-25T00:13:20Z","git_url":"git://github.com/j2objc-contrib/j2objc-gradle.git","ssh_url":"git@github.com:j2objc-contrib/j2objc-gradle.git","clone_url":"https://github.com/j2objc-contrib/j2objc-gradle.git","svn_url":"https://github.com/j2objc-contrib/j2objc-gradle","homepage":"https://github.com/j2objc-contrib/j2objc-gradle","size":2122,"stargazers_count":37,"watchers_count":37,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":50,"forks":10,"open_issues":50,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/318"},"html":{"href":"https://github.com/j2objc-contrib/j2objc-gradle/pull/318"},"issue":{"href":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/issues/318"},"comments":{"href":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/issues/318/comments"},"review_comments":{"href":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/318/comments"},"review_comment":{"href":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/pulls/318/commits"},"statuses":{"href":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/statuses/c7ec3f9cf376a996b9b3c11263f21f9278ea301e"}}}}