{"action":"created","issue":{"url":"https://api.github.com/repos/palantir/gradle-java-distribution/issues/55","repository_url":"https://api.github.com/repos/palantir/gradle-java-distribution","labels_url":"https://api.github.com/repos/palantir/gradle-java-distribution/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/palantir/gradle-java-distribution/issues/55/comments","events_url":"https://api.github.com/repos/palantir/gradle-java-distribution/issues/55/events","html_url":"https://github.com/palantir/gradle-java-distribution/pull/55","id":134800781,"number":55,"title":"Configure tasks synchronously","user":{"login":"henryptung","id":1700335,"avatar_url":"https://avatars.githubusercontent.com/u/1700335?v=3","gravatar_id":"","url":"https://api.github.com/users/henryptung","html_url":"https://github.com/henryptung","followers_url":"https://api.github.com/users/henryptung/followers","following_url":"https://api.github.com/users/henryptung/following{/other_user}","gists_url":"https://api.github.com/users/henryptung/gists{/gist_id}","starred_url":"https://api.github.com/users/henryptung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henryptung/subscriptions","organizations_url":"https://api.github.com/users/henryptung/orgs","repos_url":"https://api.github.com/users/henryptung/repos","events_url":"https://api.github.com/users/henryptung/events{/privacy}","received_events_url":"https://api.github.com/users/henryptung/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-19T08:01:53Z","updated_at":"2016-02-19T22:34:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/palantir/gradle-java-distribution/pulls/55","html_url":"https://github.com/palantir/gradle-java-distribution/pull/55","diff_url":"https://github.com/palantir/gradle-java-distribution/pull/55.diff","patch_url":"https://github.com/palantir/gradle-java-distribution/pull/55.patch"},"body":"Targets #52.\r\n\r\nTest `build.gradle`:\r\n\r\n```groovy\r\ndistribution {\r\n    serviceName \"my-service\"\r\n    mainClass \"dummy.service.MainClass\"\r\n    args \"hello\"\r\n}\r\n\r\ndependencies {\r\n    compile \"com.palantir.gradle.javadist:gradle-java-distribution:$javaDistributionVersion\"\r\n}\r\n\r\nprintln \"Class-Path: ${manifestClasspathJar.manifest.attributes[\"Class-Path\"]}\"\r\nprintln \"distTar output: ${distTar.outputs.files.singleFile}\"\r\n\r\nafterEvaluate {\r\n    println \"Class-Path (afterEvaluate): ${manifestClasspathJar.manifest.attributes[\"Class-Path\"]}\"\r\n    println \"distTar output (afterEvaluate): ${distTar.outputs.files.singleFile}\"\r\n}\r\n```\r\n\r\nWith 0.5.0:\r\n```\r\nClass-Path: null\r\ndistTar output: /home/htung/dev/sandbox/build/distributions/sandbox.tgz\r\nClass-Path (afterEvaluate): gradle-java-distribution-0.5.0.jar sandbox.jar\r\ndistTar output (afterEvaluate): /home/htung/dev/sandbox/build/distributions/my-service.tgz\r\n```\r\n\r\nAfter patch:\r\n```\r\nClass-Path: gradle-java-distribution-0.5.0-4-gd49c1de.dirty-sources.jar gradle-java-distribution-0.5.0-4-gd49c1de.dirty.jar sandbox.jar\r\ndistTar output: /home/htung/dev/sandbox/build/distributions/my-service.tgz\r\nClass-Path (afterEvaluate): gradle-java-distribution-0.5.0-4-gd49c1de.dirty-sources.jar gradle-java-distribution-0.5.0-4-gd49c1de.dirty.jar sandbox.jar\r\ndistTar output (afterEvaluate): /home/htung/dev/sandbox/build/distributions/my-service.tgz\r\n```"},"comment":{"url":"https://api.github.com/repos/palantir/gradle-java-distribution/issues/comments/186435883","html_url":"https://github.com/palantir/gradle-java-distribution/pull/55#issuecomment-186435883","issue_url":"https://api.github.com/repos/palantir/gradle-java-distribution/issues/55","id":186435883,"user":{"login":"henryptung","id":1700335,"avatar_url":"https://avatars.githubusercontent.com/u/1700335?v=3","gravatar_id":"","url":"https://api.github.com/users/henryptung","html_url":"https://github.com/henryptung","followers_url":"https://api.github.com/users/henryptung/followers","following_url":"https://api.github.com/users/henryptung/following{/other_user}","gists_url":"https://api.github.com/users/henryptung/gists{/gist_id}","starred_url":"https://api.github.com/users/henryptung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henryptung/subscriptions","organizations_url":"https://api.github.com/users/henryptung/orgs","repos_url":"https://api.github.com/users/henryptung/repos","events_url":"https://api.github.com/users/henryptung/events{/privacy}","received_events_url":"https://api.github.com/users/henryptung/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T22:34:11Z","updated_at":"2016-02-19T22:34:11Z","body":"Er, the classpath computation is lazy in the new impl, but that's not the primary problem here; the configuration of the distTar name is.\r\n\r\nThe reason conventions were deprecated is namespacing concerns, where method names could collide between plugins. In this case, the distribution extension already made `distribution` a closure-taking method, which could collide with other plugins; this implementation should have no more API collision surface area than the original."}}