{"action":"created","issue":{"url":"https://api.github.com/repos/takari/polyglot-maven/issues/52","labels_url":"https://api.github.com/repos/takari/polyglot-maven/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/takari/polyglot-maven/issues/52/comments","events_url":"https://api.github.com/repos/takari/polyglot-maven/issues/52/events","html_url":"https://github.com/takari/polyglot-maven/pull/52","id":106912391,"number":52,"title":"Fix #50: add support for scope blocks","user":{"login":"fbricon","id":148698,"avatar_url":"https://avatars.githubusercontent.com/u/148698?v=3","gravatar_id":"","url":"https://api.github.com/users/fbricon","html_url":"https://github.com/fbricon","followers_url":"https://api.github.com/users/fbricon/followers","following_url":"https://api.github.com/users/fbricon/following{/other_user}","gists_url":"https://api.github.com/users/fbricon/gists{/gist_id}","starred_url":"https://api.github.com/users/fbricon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbricon/subscriptions","organizations_url":"https://api.github.com/users/fbricon/orgs","repos_url":"https://api.github.com/users/fbricon/repos","events_url":"https://api.github.com/users/fbricon/events{/privacy}","received_events_url":"https://api.github.com/users/fbricon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-09-17T04:55:10Z","updated_at":"2015-09-18T14:17:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/takari/polyglot-maven/pulls/52","html_url":"https://github.com/takari/polyglot-maven/pull/52","diff_url":"https://github.com/takari/polyglot-maven/pull/52.diff","patch_url":"https://github.com/takari/polyglot-maven/pull/52.patch"},"body":"This new change introduces scope blocks, that make it cleaner to list/group dependencies, like:\r\n\r\n    project {\r\n       modelVersion '4.0.0'\r\n       groupId 'foo.bar'\r\n       artifactId 'example'\r\n       version '0.0.1-SNAPSHOT'\r\n       dependencies {\r\n          $test { //junit and mockito get the test scope\r\n              dependency 'junit:junit:4.12'\r\n              dependency 'org.mockito:mockito-core:1.10.19'\r\n          }\r\n          $compile {//list all compile scoped dependencies here\r\n              dependency 'foo:bar:x.y.z'\r\n              ...\r\n           }\r\n           dependency 'a:b:1.0.0' //also compile  scope\r\n            ...\r\n        } \r\n     }\r\n\r\nThe following scoped blocks are supported:\r\n\r\n- $compile {...}\r\n- $import  {...}\r\n- $test    {...}\r\n- $provided{...}\r\n- $runtime  {...}\r\n- $system  {...}\r\n\r\nIn the current implementation, dependencies can overwrite the outer scope like\r\n\r\n    $provided {\r\n        'foo:bar:x.y.z:test' //will have the test scope\r\n    }\r\n\r\nSigned-off-by: Fred Bricon <fbricon@gmail.com>"},"comment":{"url":"https://api.github.com/repos/takari/polyglot-maven/issues/comments/141463199","html_url":"https://github.com/takari/polyglot-maven/pull/52#issuecomment-141463199","issue_url":"https://api.github.com/repos/takari/polyglot-maven/issues/52","id":141463199,"user":{"login":"mkristian","id":35058,"avatar_url":"https://avatars.githubusercontent.com/u/35058?v=3","gravatar_id":"","url":"https://api.github.com/users/mkristian","html_url":"https://github.com/mkristian","followers_url":"https://api.github.com/users/mkristian/followers","following_url":"https://api.github.com/users/mkristian/following{/other_user}","gists_url":"https://api.github.com/users/mkristian/gists{/gist_id}","starred_url":"https://api.github.com/users/mkristian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkristian/subscriptions","organizations_url":"https://api.github.com/users/mkristian/orgs","repos_url":"https://api.github.com/users/mkristian/repos","events_url":"https://api.github.com/users/mkristian/events{/privacy}","received_events_url":"https://api.github.com/users/mkristian/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T14:17:50Z","updated_at":"2015-09-18T14:17:50Z","body":"with the ruby dsl there is\r\n```ruby\r\nscope(:test) do\r\n  ...\r\nend\r\n```\r\nor in groovy\r\n```groovy\r\nscope('test'){\r\n  ...\r\n}\r\n```\r\nmaybe something similar fits for groovy as well. just my 2 cents."}}