{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/5077","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/5077/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/5077/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/5077/events","html_url":"https://github.com/godotengine/godot/pull/5077","id":158802299,"number":5077,"title":"Improve Android build","user":{"login":"RandomShaper","id":11797174,"avatar_url":"https://avatars.githubusercontent.com/u/11797174?v=3","gravatar_id":"","url":"https://api.github.com/users/RandomShaper","html_url":"https://github.com/RandomShaper","followers_url":"https://api.github.com/users/RandomShaper/followers","following_url":"https://api.github.com/users/RandomShaper/following{/other_user}","gists_url":"https://api.github.com/users/RandomShaper/gists{/gist_id}","starred_url":"https://api.github.com/users/RandomShaper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RandomShaper/subscriptions","organizations_url":"https://api.github.com/users/RandomShaper/orgs","repos_url":"https://api.github.com/users/RandomShaper/repos","events_url":"https://api.github.com/users/RandomShaper/events{/privacy}","received_events_url":"https://api.github.com/users/RandomShaper/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/godotengine/godot/labels/enhancement","name":"enhancement","color":"44bbff"},{"url":"https://api.github.com/repos/godotengine/godot/labels/platform:android","name":"platform:android","color":"dddddd"},{"url":"https://api.github.com/repos/godotengine/godot/labels/topic:buildsystem","name":"topic:buildsystem","color":"ffdd44"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-06-07T00:04:48Z","updated_at":"2016-06-15T13:19:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/godotengine/godot/pulls/5077","html_url":"https://github.com/godotengine/godot/pull/5077","diff_url":"https://github.com/godotengine/godot/pull/5077.diff","patch_url":"https://github.com/godotengine/godot/pull/5077.patch"},"body":"**Edit:** Keeping just the updated, consolidated text. If this PR gets merged, I can update the docs.\r\n\r\n**Overall note: All this proposal is based on the assumption that the Android build is only used for generating the export templates as reliably as possible. Moreover, I believe that makes the Android build handier. If in some future tools-enabled Android builds were needed because of a widespread desire of using Godot under Android netbooks or so, some things would need to be changed.**\r\n\r\n## Android/build component versions\r\n\r\n- Upgrade Android plugin for Gradle to 2.1.0\r\n- Downgrade NDK platform to 14 to match minSdkVersion.\r\n\r\n## Smarter build and packaging of the Godot export template\r\n\r\n### SCons phase\r\n\r\nWhen the SCons phase of the Android build is done the generated .so file is moved to the directory relevant for the Gradle phase to pick it for the combination of arch and build type (release or debug). For instance, `platform/android/java/libs/debug/armeabi-v7a`.\r\n\r\nMoving is performed instead of copying or symlinking to avoid polluting the `bin` directory with intermediate files, because the final binaries for Android are the APKs. The only scenario (and is a theoretical one) in which the .`so` would be kept at `bin` is that of building for an arch unknown to Android. And in that case, the SCons script would print a warning message.\r\n\r\nNotes:\r\n- ARMv7 both with or without NEON will be copied to the same `armeabi-v7a` dir (the newest wins).\r\n- Both *debug* and *debug_release* targets will get copied to the same `debug` dir (the newest wins). Release is unambiguous.\r\n\r\n### Gradle phase\r\n\r\nBecause of all that is done at the SCons level, Gradle will be able to generate both debug and release APKs containing libraries for x86, ARMv6 and/or ARMv7. In the case of the debug APK it can contain the handy release_debug or a full debug build if needed.\r\n\r\nFurthermore, Gradle will generate the export template APKs with their correct naming (`android_debug.apk` and `android_release.apk`) and at the correct location at the top-level `bin` directory.\r\n\r\nAlso the Gradle script disables explicitly singing and zip-aligning of the APKs to save time since those operations must be done at export time then the final game APK is generated."},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/226184427","html_url":"https://github.com/godotengine/godot/pull/5077#issuecomment-226184427","issue_url":"https://api.github.com/repos/godotengine/godot/issues/5077","id":226184427,"user":{"login":"RandomShaper","id":11797174,"avatar_url":"https://avatars.githubusercontent.com/u/11797174?v=3","gravatar_id":"","url":"https://api.github.com/users/RandomShaper","html_url":"https://github.com/RandomShaper","followers_url":"https://api.github.com/users/RandomShaper/followers","following_url":"https://api.github.com/users/RandomShaper/following{/other_user}","gists_url":"https://api.github.com/users/RandomShaper/gists{/gist_id}","starred_url":"https://api.github.com/users/RandomShaper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RandomShaper/subscriptions","organizations_url":"https://api.github.com/users/RandomShaper/orgs","repos_url":"https://api.github.com/users/RandomShaper/repos","events_url":"https://api.github.com/users/RandomShaper/events{/privacy}","received_events_url":"https://api.github.com/users/RandomShaper/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T13:19:56Z","updated_at":"2016-06-15T13:19:56Z","body":"I've added a couple of ignores corresponding to directories the old Android Eclipse-based dev tools generated.\r\n\r\nAnd I've put everything together in a single commit."}}
{"actor":{"display_login":"RandomShaper"}}