{"action":"opened","number":2460,"pull_request":{"url":"https://api.github.com/repos/triplea-game/triplea/pulls/2460","id":144042895,"html_url":"https://github.com/triplea-game/triplea/pull/2460","diff_url":"https://github.com/triplea-game/triplea/pull/2460.diff","patch_url":"https://github.com/triplea-game/triplea/pull/2460.patch","issue_url":"https://api.github.com/repos/triplea-game/triplea/issues/2460","number":2460,"state":"open","locked":false,"title":"Download required assets instead of cloning entire repo","user":{"login":"ssoloff","id":4826349,"avatar_url":"https://avatars2.githubusercontent.com/u/4826349?v=4","gravatar_id":"","url":"https://api.github.com/users/ssoloff","html_url":"https://github.com/ssoloff","followers_url":"https://api.github.com/users/ssoloff/followers","following_url":"https://api.github.com/users/ssoloff/following{/other_user}","gists_url":"https://api.github.com/users/ssoloff/gists{/gist_id}","starred_url":"https://api.github.com/users/ssoloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssoloff/subscriptions","organizations_url":"https://api.github.com/users/ssoloff/orgs","repos_url":"https://api.github.com/users/ssoloff/repos","events_url":"https://api.github.com/users/ssoloff/events{/privacy}","received_events_url":"https://api.github.com/users/ssoloff/received_events","type":"User","site_admin":false},"body":"This PR addresses the issue we have during the Gradle build in which the entire `triplea-game/assets` repo is cloned.  Cloning this repo requires downloading ~500 MiB of content, which will only continue to increase as new assets are added to the repo.\r\n\r\nThe easiest solution to this problem would have been to perform a shallow clone of the repo.  While that still would have downloaded unnecessary files (e.g. bundled JREs for the previous release), it would have been acceptable.  Unfortunately, JGit (which all Gradle Git plugins use) does not support shallow clones at this time.\r\n\r\nThe solution offered in this PR is to simply download the required assets directly from GitHub instead of cloning the repo.\r\n\r\n#### Build changes\r\n\r\nThe `updateAssets` task, which cloned the assets repo, was replaced with the `downloadAssets` task, which downloads the nine files our build currently requires from the assets repo.  It uses the `de.undercouch.download` Gradle plugin to perform this task.\r\n\r\n#### Build issues for review\r\n\r\nUnfortunately, GitHub does [not support conditional HTTP requests](https://github.com/isaacs/github/issues/692) at this time.  Thus, it is not possible to make use of the `onlyIfNewer` option of the Download task.  Therefore, in order to prevent repeated downloads of the assets, I set the `overwrite` option to `false`.  If on the off chance an asset is updated in the repo after it has been downloaded locally, a dev will be required to either manually delete the individual local asset or simply run the `clean` task in order to force the updated asset(s) to be downloaded.\r\n\r\nThis issue only affects devs who need to build the installer.  It does not affect the Travis build, which always starts from a clean slate.\r\n\r\n#### Testing\r\n\r\nI created a release branch in my fork to test these changes.  The [Travis build](https://travis-ci.org/ssoloff/triplea-game-triplea/builds/281737101) appeared to work fine.\r\n\r\nI also did some local testing to ensure the assets are not re-downloaded if they are already present locally.","created_at":"2017-09-30T20:19:21Z","updated_at":"2017-09-30T20:19:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/triplea-game/triplea/pulls/2460/commits","review_comments_url":"https://api.github.com/repos/triplea-game/triplea/pulls/2460/comments","review_comment_url":"https://api.github.com/repos/triplea-game/triplea/pulls/comments{/number}","comments_url":"https://api.github.com/repos/triplea-game/triplea/issues/2460/comments","statuses_url":"https://api.github.com/repos/triplea-game/triplea/statuses/3b7a5eab9e3b7c752d9560c3a13f14c779558a62","head":{"label":"ssoloff:download-required-assets-instead-of-cloning-repo","ref":"download-required-assets-instead-of-cloning-repo","sha":"3b7a5eab9e3b7c752d9560c3a13f14c779558a62","user":{"login":"ssoloff","id":4826349,"avatar_url":"https://avatars2.githubusercontent.com/u/4826349?v=4","gravatar_id":"","url":"https://api.github.com/users/ssoloff","html_url":"https://github.com/ssoloff","followers_url":"https://api.github.com/users/ssoloff/followers","following_url":"https://api.github.com/users/ssoloff/following{/other_user}","gists_url":"https://api.github.com/users/ssoloff/gists{/gist_id}","starred_url":"https://api.github.com/users/ssoloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssoloff/subscriptions","organizations_url":"https://api.github.com/users/ssoloff/orgs","repos_url":"https://api.github.com/users/ssoloff/repos","events_url":"https://api.github.com/users/ssoloff/events{/privacy}","received_events_url":"https://api.github.com/users/ssoloff/received_events","type":"User","site_admin":false},"repo":{"id":76764435,"name":"triplea-game-triplea","full_name":"ssoloff/triplea-game-triplea","owner":{"login":"ssoloff","id":4826349,"avatar_url":"https://avatars2.githubusercontent.com/u/4826349?v=4","gravatar_id":"","url":"https://api.github.com/users/ssoloff","html_url":"https://github.com/ssoloff","followers_url":"https://api.github.com/users/ssoloff/followers","following_url":"https://api.github.com/users/ssoloff/following{/other_user}","gists_url":"https://api.github.com/users/ssoloff/gists{/gist_id}","starred_url":"https://api.github.com/users/ssoloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssoloff/subscriptions","organizations_url":"https://api.github.com/users/ssoloff/orgs","repos_url":"https://api.github.com/users/ssoloff/repos","events_url":"https://api.github.com/users/ssoloff/events{/privacy}","received_events_url":"https://api.github.com/users/ssoloff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ssoloff/triplea-game-triplea","description":"TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.","fork":true,"url":"https://api.github.com/repos/ssoloff/triplea-game-triplea","forks_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/forks","keys_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/teams","hooks_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/hooks","issue_events_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/issues/events{/number}","events_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/events","assignees_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/assignees{/user}","branches_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/branches{/branch}","tags_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/tags","blobs_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/git/refs{/sha}","trees_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/statuses/{sha}","languages_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/languages","stargazers_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/stargazers","contributors_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/contributors","subscribers_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/subscribers","subscription_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/subscription","commits_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/commits{/sha}","git_commits_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/git/commits{/sha}","comments_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/comments{/number}","issue_comment_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/issues/comments{/number}","contents_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/contents/{+path}","compare_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/merges","archive_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/downloads","issues_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/issues{/number}","pulls_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/pulls{/number}","milestones_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/milestones{/number}","notifications_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/labels{/name}","releases_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/releases{/id}","deployments_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/deployments","created_at":"2016-12-18T05:24:33Z","updated_at":"2017-06-02T01:15:48Z","pushed_at":"2017-09-30T20:06:57Z","git_url":"git://github.com/ssoloff/triplea-game-triplea.git","ssh_url":"git@github.com:ssoloff/triplea-game-triplea.git","clone_url":"https://github.com/ssoloff/triplea-game-triplea.git","svn_url":"https://github.com/ssoloff/triplea-game-triplea","homepage":null,"size":712450,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"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":"triplea-game:master","ref":"master","sha":"e75ee8247fb27444dc6abeeac9f4731de227e749","user":{"login":"triplea-game","id":13318615,"avatar_url":"https://avatars0.githubusercontent.com/u/13318615?v=4","gravatar_id":"","url":"https://api.github.com/users/triplea-game","html_url":"https://github.com/triplea-game","followers_url":"https://api.github.com/users/triplea-game/followers","following_url":"https://api.github.com/users/triplea-game/following{/other_user}","gists_url":"https://api.github.com/users/triplea-game/gists{/gist_id}","starred_url":"https://api.github.com/users/triplea-game/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplea-game/subscriptions","organizations_url":"https://api.github.com/users/triplea-game/orgs","repos_url":"https://api.github.com/users/triplea-game/repos","events_url":"https://api.github.com/users/triplea-game/events{/privacy}","received_events_url":"https://api.github.com/users/triplea-game/received_events","type":"Organization","site_admin":false},"repo":{"id":39766308,"name":"triplea","full_name":"triplea-game/triplea","owner":{"login":"triplea-game","id":13318615,"avatar_url":"https://avatars0.githubusercontent.com/u/13318615?v=4","gravatar_id":"","url":"https://api.github.com/users/triplea-game","html_url":"https://github.com/triplea-game","followers_url":"https://api.github.com/users/triplea-game/followers","following_url":"https://api.github.com/users/triplea-game/following{/other_user}","gists_url":"https://api.github.com/users/triplea-game/gists{/gist_id}","starred_url":"https://api.github.com/users/triplea-game/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplea-game/subscriptions","organizations_url":"https://api.github.com/users/triplea-game/orgs","repos_url":"https://api.github.com/users/triplea-game/repos","events_url":"https://api.github.com/users/triplea-game/events{/privacy}","received_events_url":"https://api.github.com/users/triplea-game/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/triplea-game/triplea","description":"TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.","fork":false,"url":"https://api.github.com/repos/triplea-game/triplea","forks_url":"https://api.github.com/repos/triplea-game/triplea/forks","keys_url":"https://api.github.com/repos/triplea-game/triplea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/triplea-game/triplea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/triplea-game/triplea/teams","hooks_url":"https://api.github.com/repos/triplea-game/triplea/hooks","issue_events_url":"https://api.github.com/repos/triplea-game/triplea/issues/events{/number}","events_url":"https://api.github.com/repos/triplea-game/triplea/events","assignees_url":"https://api.github.com/repos/triplea-game/triplea/assignees{/user}","branches_url":"https://api.github.com/repos/triplea-game/triplea/branches{/branch}","tags_url":"https://api.github.com/repos/triplea-game/triplea/tags","blobs_url":"https://api.github.com/repos/triplea-game/triplea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/triplea-game/triplea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/triplea-game/triplea/git/refs{/sha}","trees_url":"https://api.github.com/repos/triplea-game/triplea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/triplea-game/triplea/statuses/{sha}","languages_url":"https://api.github.com/repos/triplea-game/triplea/languages","stargazers_url":"https://api.github.com/repos/triplea-game/triplea/stargazers","contributors_url":"https://api.github.com/repos/triplea-game/triplea/contributors","subscribers_url":"https://api.github.com/repos/triplea-game/triplea/subscribers","subscription_url":"https://api.github.com/repos/triplea-game/triplea/subscription","commits_url":"https://api.github.com/repos/triplea-game/triplea/commits{/sha}","git_commits_url":"https://api.github.com/repos/triplea-game/triplea/git/commits{/sha}","comments_url":"https://api.github.com/repos/triplea-game/triplea/comments{/number}","issue_comment_url":"https://api.github.com/repos/triplea-game/triplea/issues/comments{/number}","contents_url":"https://api.github.com/repos/triplea-game/triplea/contents/{+path}","compare_url":"https://api.github.com/repos/triplea-game/triplea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/triplea-game/triplea/merges","archive_url":"https://api.github.com/repos/triplea-game/triplea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/triplea-game/triplea/downloads","issues_url":"https://api.github.com/repos/triplea-game/triplea/issues{/number}","pulls_url":"https://api.github.com/repos/triplea-game/triplea/pulls{/number}","milestones_url":"https://api.github.com/repos/triplea-game/triplea/milestones{/number}","notifications_url":"https://api.github.com/repos/triplea-game/triplea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/triplea-game/triplea/labels{/name}","releases_url":"https://api.github.com/repos/triplea-game/triplea/releases{/id}","deployments_url":"https://api.github.com/repos/triplea-game/triplea/deployments","created_at":"2015-07-27T09:32:58Z","updated_at":"2017-09-29T06:53:33Z","pushed_at":"2017-09-30T18:23:50Z","git_url":"git://github.com/triplea-game/triplea.git","ssh_url":"git@github.com:triplea-game/triplea.git","clone_url":"https://github.com/triplea-game/triplea.git","svn_url":"https://github.com/triplea-game/triplea","homepage":null,"size":720718,"stargazers_count":73,"watchers_count":73,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":82,"forks":45,"open_issues":82,"watchers":73,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/2460"},"html":{"href":"https://github.com/triplea-game/triplea/pull/2460"},"issue":{"href":"https://api.github.com/repos/triplea-game/triplea/issues/2460"},"comments":{"href":"https://api.github.com/repos/triplea-game/triplea/issues/2460/comments"},"review_comments":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/2460/comments"},"review_comment":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/2460/commits"},"statuses":{"href":"https://api.github.com/repos/triplea-game/triplea/statuses/3b7a5eab9e3b7c752d9560c3a13f14c779558a62"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":23,"deletions":13,"changed_files":1}}
{"actor":{"display_login":"ssoloff"}}