{"action":"created","issue":{"url":"https://api.github.com/repos/gradle/gradle/issues/2379","repository_url":"https://api.github.com/repos/gradle/gradle","labels_url":"https://api.github.com/repos/gradle/gradle/issues/2379/labels{/name}","comments_url":"https://api.github.com/repos/gradle/gradle/issues/2379/comments","events_url":"https://api.github.com/repos/gradle/gradle/issues/2379/events","html_url":"https://github.com/gradle/gradle/issues/2379","id":240236776,"number":2379,"title":"Add --type gradle-plugin to init task","user":{"login":"balazsbanyai","id":12152147,"avatar_url":"https://avatars3.githubusercontent.com/u/12152147?v=3","gravatar_id":"","url":"https://api.github.com/users/balazsbanyai","html_url":"https://github.com/balazsbanyai","followers_url":"https://api.github.com/users/balazsbanyai/followers","following_url":"https://api.github.com/users/balazsbanyai/following{/other_user}","gists_url":"https://api.github.com/users/balazsbanyai/gists{/gist_id}","starred_url":"https://api.github.com/users/balazsbanyai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balazsbanyai/subscriptions","organizations_url":"https://api.github.com/users/balazsbanyai/orgs","repos_url":"https://api.github.com/users/balazsbanyai/repos","events_url":"https://api.github.com/users/balazsbanyai/events{/privacy}","received_events_url":"https://api.github.com/users/balazsbanyai/received_events","type":"User","site_admin":false},"labels":[{"id":460356753,"url":"https://api.github.com/repos/gradle/gradle/labels/a:feature","name":"a:feature","color":"0e8a16","default":false},{"id":478384995,"url":"https://api.github.com/repos/gradle/gradle/labels/from:contributor","name":"from:contributor","color":"0052cc","default":false},{"id":285742320,"url":"https://api.github.com/repos/gradle/gradle/labels/in:build-init-plugin","name":"in:build-init-plugin","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-07-03T18:06:09Z","updated_at":"2017-07-06T22:01:16Z","closed_at":null,"body":"When creating a gradle plugin from scratch, it would be great if the init task could create an empty plugin project scaffolding, including the package structure and META-INF files.\r\n\r\n### Expected Behavior\r\nIt should work like:\r\ngradle init --type gradle-plugin -Ppackage=com.my.plugin -PpluginClass=MyPlugin\r\n\r\n_package_ is optional, defaults to default package\r\n_pluginClass_ is optional, defaults to \"MyPlugin\"\r\n\r\n1, Which would create the following folder structure:\r\n```\r\n.\r\n  src\r\n    main\r\n      groovy\r\n        com\r\n          my \r\n            plugin\r\n              MyPlugin.groovy\r\n      resources\r\n        META-INF\r\n          gradle-plugins\r\n            com.my.plugin.properties  \r\n```\r\n\r\n2, Init the project like a groovy library, but apply the plugin development plugin as well\r\n```\r\napply plugin: 'java-gradle-plugin'\r\n```\r\n\r\n### Current Behavior\r\nThe current init task does not support creating plugin scaffolding projects.\r\n\r\n### Context\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\nI have created numerous plugins during my work, and always found it peculiar and error-prone to create plugin scaffoldings. There are certainly other ways to implements this feature, but when I read [this](https://docs.gradle.org/3.3/userguide/build_init_plugin.html) paper, I feel that this would be the right way.\r\n"},"comment":{"url":"https://api.github.com/repos/gradle/gradle/issues/comments/313531442","html_url":"https://github.com/gradle/gradle/issues/2379#issuecomment-313531442","issue_url":"https://api.github.com/repos/gradle/gradle/issues/2379","id":313531442,"user":{"login":"balazsbanyai","id":12152147,"avatar_url":"https://avatars3.githubusercontent.com/u/12152147?v=3","gravatar_id":"","url":"https://api.github.com/users/balazsbanyai","html_url":"https://github.com/balazsbanyai","followers_url":"https://api.github.com/users/balazsbanyai/followers","following_url":"https://api.github.com/users/balazsbanyai/following{/other_user}","gists_url":"https://api.github.com/users/balazsbanyai/gists{/gist_id}","starred_url":"https://api.github.com/users/balazsbanyai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balazsbanyai/subscriptions","organizations_url":"https://api.github.com/users/balazsbanyai/orgs","repos_url":"https://api.github.com/users/balazsbanyai/repos","events_url":"https://api.github.com/users/balazsbanyai/events{/privacy}","received_events_url":"https://api.github.com/users/balazsbanyai/received_events","type":"User","site_admin":false},"created_at":"2017-07-06T22:01:16Z","updated_at":"2017-07-06T22:01:16Z","body":"I would be happy to implement this! I will get back to you with the first PR soon."}}
{"actor":{"display_login":"balazsbanyai"}}