{"action":"created","issue":{"url":"https://api.github.com/repos/ardock/android-topeka/issues/1","labels_url":"https://api.github.com/repos/ardock/android-topeka/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ardock/android-topeka/issues/1/comments","events_url":"https://api.github.com/repos/ardock/android-topeka/issues/1/events","html_url":"https://github.com/ardock/android-topeka/issues/1","id":118275978,"number":1,"title":"Disable pre-dexing and animations on your build server","user":{"login":"ardock","id":1142360,"avatar_url":"https://avatars.githubusercontent.com/u/1142360?v=3","gravatar_id":"","url":"https://api.github.com/users/ardock","html_url":"https://github.com/ardock","followers_url":"https://api.github.com/users/ardock/followers","following_url":"https://api.github.com/users/ardock/following{/other_user}","gists_url":"https://api.github.com/users/ardock/gists{/gist_id}","starred_url":"https://api.github.com/users/ardock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ardock/subscriptions","organizations_url":"https://api.github.com/users/ardock/orgs","repos_url":"https://api.github.com/users/ardock/repos","events_url":"https://api.github.com/users/ardock/events{/privacy}","received_events_url":"https://api.github.com/users/ardock/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ardock/android-topeka/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-22T17:23:37Z","updated_at":"2015-11-22T20:42:31Z","closed_at":null,"body":"In general build system will always perform clean builds and this pre-dexing becomes a penalty.\r\n\r\nTests now fail on devices with animations enabled since `AnimationAwareTestRule` was added.\r\n\r\nI'll explain here my changes to disable pre-dexing and animations on your build server."},"comment":{"url":"https://api.github.com/repos/ardock/android-topeka/issues/comments/158798180","html_url":"https://github.com/ardock/android-topeka/issues/1#issuecomment-158798180","issue_url":"https://api.github.com/repos/ardock/android-topeka/issues/1","id":158798180,"user":{"login":"ardock","id":1142360,"avatar_url":"https://avatars.githubusercontent.com/u/1142360?v=3","gravatar_id":"","url":"https://api.github.com/users/ardock","html_url":"https://github.com/ardock","followers_url":"https://api.github.com/users/ardock/followers","following_url":"https://api.github.com/users/ardock/following{/other_user}","gists_url":"https://api.github.com/users/ardock/gists{/gist_id}","starred_url":"https://api.github.com/users/ardock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ardock/subscriptions","organizations_url":"https://api.github.com/users/ardock/orgs","repos_url":"https://api.github.com/users/ardock/repos","events_url":"https://api.github.com/users/ardock/events{/privacy}","received_events_url":"https://api.github.com/users/ardock/received_events","type":"User","site_admin":false},"created_at":"2015-11-22T20:42:31Z","updated_at":"2015-11-22T20:42:31Z","body":"[Disable pre-dexing only on your build server](http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance.)\r\n\r\nFirst, in your root build.gradle add the following:\r\n\r\n```\r\n// Improve Build Server performance.\r\n// See Tip 3: http://tools.android.com/tech-docs/new-build-system/tips\r\nproject.ext.preDexLibs = !project.hasProperty('disablePreDex')\r\n\r\nsubprojects {\r\n    // Disable pre-dexing only on your build server.\r\n    project.plugins.whenPluginAdded { plugin ->\r\n        if (\"com.android.build.gradle.AppPlugin\".equals(plugin.class.name)) {\r\n            project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs\r\n        } else if (\"com.android.build.gradle.LibraryPlugin\".equals(plugin.class.name)) {\r\n            project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs\r\n        }\r\n    }\r\n}\r\n```\r\nThen configure your build server to call Gradle tasks with `-PdisablePreDex` like this:\r\n\r\n```\r\n./gradlew clean cAT -PdisablePreDex\r\n```"}}