{"action":"closed","issue":{"url":"https://api.github.com/repos/dita-ot/dita-ot/issues/2075","labels_url":"https://api.github.com/repos/dita-ot/dita-ot/issues/2075/labels{/name}","comments_url":"https://api.github.com/repos/dita-ot/dita-ot/issues/2075/comments","events_url":"https://api.github.com/repos/dita-ot/dita-ot/issues/2075/events","html_url":"https://github.com/dita-ot/dita-ot/issues/2075","id":109073663,"number":2075,"title":"Add Gradle wrapper for running DITA-OT","user":{"login":"eerohele","id":31859,"avatar_url":"https://avatars.githubusercontent.com/u/31859?v=3","gravatar_id":"","url":"https://api.github.com/users/eerohele","html_url":"https://github.com/eerohele","followers_url":"https://api.github.com/users/eerohele/followers","following_url":"https://api.github.com/users/eerohele/following{/other_user}","gists_url":"https://api.github.com/users/eerohele/gists{/gist_id}","starred_url":"https://api.github.com/users/eerohele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eerohele/subscriptions","organizations_url":"https://api.github.com/users/eerohele/orgs","repos_url":"https://api.github.com/users/eerohele/repos","events_url":"https://api.github.com/users/eerohele/events{/privacy}","received_events_url":"https://api.github.com/users/eerohele/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dita-ot/dita-ot/labels/feature","name":"feature","color":"02e10c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-30T12:08:24Z","updated_at":"2015-10-31T17:38:20Z","closed_at":"2015-10-31T17:38:20Z","body":"This will let us take advantage of the [Gradle Daemon](https://docs.gradle.org/2.5/userguide/gradle_daemon.html), which will significantly reduce build times for transformations after the first one.\r\n\r\nSome preliminary numbers:\r\n\r\n```bash\r\n# `bench` is a shell script that runs a command N times and times it.\r\n\r\n# Ant:\r\nbench 25 ant -lib lib:resources -f build.xml -Dargs.input=$PWD/samples/hierarchy.ditamap \\\r\n  -Dtranstype=xhtml\r\n...\r\n      216.64 real       552.38 user        24.49 sys\r\n\r\n# Gradle:\r\nbench 25 gradle --info build\r\n…\r\n      93.66 real        56.09 user         5.02 sys\r\n```\r\n\r\nIn other words, over 25 runs, the execution time drops to less than a half.\r\n\r\n(The Gradle `build` task simply calls Ant with the same parameters as above.)\r\n\r\n**EDIT**: I have the Gradle daemon [enabled by default](https://docs.gradle.org/2.5/userguide/gradle_daemon.html#N1168A) via the `GRADLE_OPTS` environment variable. Otherwise, if you want to test this yourself, you can do the same or pass the `--daemon` flag to Gradle."}}