{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/5160","labels_url":"https://api.github.com/repos/facebook/react-native/issues/5160/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/5160/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/5160/events","html_url":"https://github.com/facebook/react-native/pull/5160","id":125252190,"number":5160,"title":"[Android] Add support for split build per architecture","user":{"login":"mkonicek","id":346214,"avatar_url":"https://avatars.githubusercontent.com/u/346214?v=3","gravatar_id":"","url":"https://api.github.com/users/mkonicek","html_url":"https://github.com/mkonicek","followers_url":"https://api.github.com/users/mkonicek/followers","following_url":"https://api.github.com/users/mkonicek/following{/other_user}","gists_url":"https://api.github.com/users/mkonicek/gists{/gist_id}","starred_url":"https://api.github.com/users/mkonicek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkonicek/subscriptions","organizations_url":"https://api.github.com/users/mkonicek/orgs","repos_url":"https://api.github.com/users/mkonicek/repos","events_url":"https://api.github.com/users/mkonicek/events{/privacy}","received_events_url":"https://api.github.com/users/mkonicek/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-06T20:08:05Z","updated_at":"2016-01-07T15:46:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/5160","html_url":"https://github.com/facebook/react-native/pull/5160","diff_url":"https://github.com/facebook/react-native/pull/5160.diff","patch_url":"https://github.com/facebook/react-native/pull/5160.patch"},"body":"This allows everyone to deploy significantly smaller APKs to they Play Store by building separate APKs for ARM, x86 architectures.\r\n\r\nFor a simple app, a release APK minified with Produard:\r\n- Universal APK is **7MB**\r\n- x86 APK is **4.6MB** (34% reduction)\r\n- ARM APK is **3.7MB** (47% reduction)\r\n\r\n### Test Plan:\r\n\r\nCreated a sample project, uncommented `// include \"armeabi-v7a\", 'x86'`:\r\n\r\n    cd android\r\n    ./gradlew assembleDebug\r\n\r\nThree APKs were created, unzipped each: one has only x86 binaries,\r\none has ARM binaries, one has both.\r\n\r\n    ./gradlew assembleRelease\r\n\r\nThree APKs were created, JS bundle is correcly added to assets.\r\n\r\n    react-native run-android\r\n\r\nThe correct APK is installed on the emulator and the app runs fine\r\n(Gradle output: \"Installing APK 'app-x86-debug.apk'\").\r\n\r\nWith the line commented out the behavior is exactly the same as before,\r\nonly one universal APK is built.\r\n\r\nChecked that version codes are set correctly as decribed in\r\nhttp://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits\r\nhttp://developer.android.com/intl/ru/google/play/publishing/multiple-apks.html\r\n\r\n    aapt l -a app-universal-debug.apk | grep android:version\r\n        A: android:versionCode(0x0101021b)=(type 0x10)0x1\r\n\r\n    aapt l -a app-armeabi-v7a-debug.apk | grep android:version\r\n        A: android:versionCode(0x0101021b)=(type 0x10)0x100001\r\n\r\n    aapt l -a app-x86-debug.apk | grep android:version\r\n        A: android:versionCode(0x0101021b)=(type 0x10)0x200001\r\n\r\n  "},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/169701425","html_url":"https://github.com/facebook/react-native/pull/5160#issuecomment-169701425","issue_url":"https://api.github.com/repos/facebook/react-native/issues/5160","id":169701425,"user":{"login":"facebook-github-bot","id":6422482,"avatar_url":"https://avatars.githubusercontent.com/u/6422482?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2016-01-07T15:46:17Z","updated_at":"2016-01-07T15:46:17Z","body":"@mkonicek updated the pull request."}}