{"action":"created","issue":{"url":"https://api.github.com/repos/tomaka/android-rs-glue/issues/75","repository_url":"https://api.github.com/repos/tomaka/android-rs-glue","labels_url":"https://api.github.com/repos/tomaka/android-rs-glue/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/tomaka/android-rs-glue/issues/75/comments","events_url":"https://api.github.com/repos/tomaka/android-rs-glue/issues/75/events","html_url":"https://github.com/tomaka/android-rs-glue/pull/75","id":148926133,"number":75,"title":"The apk builder is now a Cargo subcommand","user":{"login":"tomaka","id":1412254,"avatar_url":"https://avatars.githubusercontent.com/u/1412254?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-17T07:14:37Z","updated_at":"2016-04-17T13:12:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tomaka/android-rs-glue/pulls/75","html_url":"https://github.com/tomaka/android-rs-glue/pull/75","diff_url":"https://github.com/tomaka/android-rs-glue/pull/75.diff","patch_url":"https://github.com/tomaka/android-rs-glue/pull/75.patch"},"body":"Turns the apk-builder into `cargo-apk`, which provides the `cargo apk` Cargo subcommand.\r\n\r\nUsing it will:\r\n\r\n- Build a `android-artifacts` directory inside `target`.\r\n- Compile your package for the given list of platforms (not configurable yet, defaults to just arm-android).\r\n- Compile `android_native_glue` for each platform.\r\n- Compile some glue that will make `android_main` call Rust's `main`.\r\n- Setup the build directory and run `ant`.\r\n\r\nTo do:\r\n\r\n- Add parsing of a `CargoApk.toml` file that can indicate various information about the package.\r\n- Add parsing the `.cargo/config` file to find out the path to the Android SDK and NDK.\r\n- Add various subcommands, like `cargo apk install` that would invoke `adb`.\r\n- Make everything cleaner. It can fail in several ways, and error messages aren't very explicit.\r\n\r\nThe idea is that it should now be much simpler to build an apk by just running `cargo install cargo-apk` followed with `cargo apk`, without having to modify your source code or anything fancy.\r\nYou would be able to configure your build with a `CargoApk.toml` file whose content remains to be determined. Another advantage is that the build directory wouldn't be destroyed, making it possible to easily  tweak and debug builds.\r\n\r\nThe setup would also be greatly simplified by just having to install the NDK, the SDK, and a compatible rustc thanks to rustup. An NDK standalone toolchain would no longer be needed.\r\n\r\ncc @ozkriff @larsbergstrom (@brson and @alexcrichton maybe as well?)\r\n"},"comment":{"url":"https://api.github.com/repos/tomaka/android-rs-glue/issues/comments/211014813","html_url":"https://github.com/tomaka/android-rs-glue/pull/75#issuecomment-211014813","issue_url":"https://api.github.com/repos/tomaka/android-rs-glue/issues/75","id":211014813,"user":{"login":"tomaka","id":1412254,"avatar_url":"https://avatars.githubusercontent.com/u/1412254?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T13:12:55Z","updated_at":"2016-04-17T13:12:55Z","body":"Thing should work fine, but I'm going to test it properly tomorrow."}}