{"action":"created","issue":{"url":"https://api.github.com/repos/stevesaliman/gradle-cobertura-plugin/issues/109","repository_url":"https://api.github.com/repos/stevesaliman/gradle-cobertura-plugin","labels_url":"https://api.github.com/repos/stevesaliman/gradle-cobertura-plugin/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/stevesaliman/gradle-cobertura-plugin/issues/109/comments","events_url":"https://api.github.com/repos/stevesaliman/gradle-cobertura-plugin/issues/109/events","html_url":"https://github.com/stevesaliman/gradle-cobertura-plugin/issues/109","id":153001869,"number":109,"title":"How can I access the plugin from init.gradle?","user":{"login":"drdtgh","id":11962317,"avatar_url":"https://avatars.githubusercontent.com/u/11962317?v=3","gravatar_id":"","url":"https://api.github.com/users/drdtgh","html_url":"https://github.com/drdtgh","followers_url":"https://api.github.com/users/drdtgh/followers","following_url":"https://api.github.com/users/drdtgh/following{/other_user}","gists_url":"https://api.github.com/users/drdtgh/gists{/gist_id}","starred_url":"https://api.github.com/users/drdtgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drdtgh/subscriptions","organizations_url":"https://api.github.com/users/drdtgh/orgs","repos_url":"https://api.github.com/users/drdtgh/repos","events_url":"https://api.github.com/users/drdtgh/events{/privacy}","received_events_url":"https://api.github.com/users/drdtgh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-04T12:40:42Z","updated_at":"2016-05-27T19:38:37Z","closed_at":"2016-05-27T19:38:37Z","body":"I am trying to write a global `init.gradle` that all of my team's projects can use to get access to the standard reports (codenarc, cobertura) without having to manually update each project.   I am following [the documentation for init.gradle scripts](https://docs.gradle.org/current/userguide/init_scripts.html), and it has worked so far, but not for the cobertura plugin:\r\n\r\n```\r\ninitscript {\r\n    repositories {\r\n        maven { url \"https://plugins.gradle.org/m2/\" }\r\n        mavenCentral()\r\n    }\r\n    dependencies {\r\n        classpath \"net.saliman:gradle-cobertura-plugin:2.3.1\"\r\n    }\r\n}\r\napply plugin: 'net.saliman.cobertura'\r\n```\r\n\r\n```\r\n> gradlew.bat -I config\\.gradle\\init.gradle tasks\r\nFAILURE: Build failed with an exception.\r\n* Where:\r\nInitialization script 'config\\.gradle\\init.gradle' line: 49\r\n* What went wrong:\r\nPlugin with id 'net.saliman.cobertura' not found.\r\n```\r\n\r\nI think the issue is with the classpath setting, since none of my other reports require one.  Can you advise what I need to do for this to work?  I also tried putting the settings in a `buildscript` block, no joy.\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/stevesaliman/gradle-cobertura-plugin/issues/comments/222235812","html_url":"https://github.com/stevesaliman/gradle-cobertura-plugin/issues/109#issuecomment-222235812","issue_url":"https://api.github.com/repos/stevesaliman/gradle-cobertura-plugin/issues/109","id":222235812,"user":{"login":"stevesaliman","id":1919803,"avatar_url":"https://avatars.githubusercontent.com/u/1919803?v=3","gravatar_id":"","url":"https://api.github.com/users/stevesaliman","html_url":"https://github.com/stevesaliman","followers_url":"https://api.github.com/users/stevesaliman/followers","following_url":"https://api.github.com/users/stevesaliman/following{/other_user}","gists_url":"https://api.github.com/users/stevesaliman/gists{/gist_id}","starred_url":"https://api.github.com/users/stevesaliman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevesaliman/subscriptions","organizations_url":"https://api.github.com/users/stevesaliman/orgs","repos_url":"https://api.github.com/users/stevesaliman/repos","events_url":"https://api.github.com/users/stevesaliman/events{/privacy}","received_events_url":"https://api.github.com/users/stevesaliman/received_events","type":"User","site_admin":false},"created_at":"2016-05-27T19:38:37Z","updated_at":"2016-05-27T19:38:37Z","body":"I just released version 2.3.2, which includes support for applying the cobertura plugin in ```init.gradle```.  It can also be applied in ```settings.gradle```"}}
{"actor":{"display_login":"stevesaliman"}}