{"action":"created","issue":{"url":"https://api.github.com/repos/gradle/gradle-script-kotlin/issues/179","repository_url":"https://api.github.com/repos/gradle/gradle-script-kotlin","labels_url":"https://api.github.com/repos/gradle/gradle-script-kotlin/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/gradle/gradle-script-kotlin/issues/179/comments","events_url":"https://api.github.com/repos/gradle/gradle-script-kotlin/issues/179/events","html_url":"https://github.com/gradle/gradle-script-kotlin/issues/179","id":190041546,"number":179,"title":"Unable to apply plugins from an applied build script file","user":{"login":"tadaskay","id":4745368,"avatar_url":"https://avatars.githubusercontent.com/u/4745368?v=3","gravatar_id":"","url":"https://api.github.com/users/tadaskay","html_url":"https://github.com/tadaskay","followers_url":"https://api.github.com/users/tadaskay/followers","following_url":"https://api.github.com/users/tadaskay/following{/other_user}","gists_url":"https://api.github.com/users/tadaskay/gists{/gist_id}","starred_url":"https://api.github.com/users/tadaskay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadaskay/subscriptions","organizations_url":"https://api.github.com/users/tadaskay/orgs","repos_url":"https://api.github.com/users/tadaskay/repos","events_url":"https://api.github.com/users/tadaskay/events{/privacy}","received_events_url":"https://api.github.com/users/tadaskay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-17T13:04:31Z","updated_at":"2016-11-17T23:02:24Z","closed_at":null,"body":"I have created a small sample project: https://github.com/tadaskay/issues/tree/master/gradle-script-kotlin-apply-from-plugin\r\n\r\nIt's not possible to `apply<HelloWorldPlugin>()` from an applied script (`applyFrom(\"applied.gradle.kts\")` in `build.gradle.kts`)\r\n\r\n```\r\nError: Unresolved reference: HelloWorldPlugin (/Users/tadaskay/prj/issues/gradle-script-kotlin-apply-from-plugin/applied.gradle.kts (1:26))\r\nError: Unresolved reference: HelloWorldPlugin (/Users/tadaskay/prj/issues/gradle-script-kotlin-apply-from-plugin/applied.gradle.kts (3:7))\r\n```\r\n\r\nBTW if you use `apply { plugin(\"...\") }` syntax, it seems to work for applying plugin itself, but then you have the same problem when you try to configure the extension classes in the applied script."},"comment":{"url":"https://api.github.com/repos/gradle/gradle-script-kotlin/issues/comments/261397824","html_url":"https://github.com/gradle/gradle-script-kotlin/issues/179#issuecomment-261397824","issue_url":"https://api.github.com/repos/gradle/gradle-script-kotlin/issues/179","id":261397824,"user":{"login":"tadaskay","id":4745368,"avatar_url":"https://avatars.githubusercontent.com/u/4745368?v=3","gravatar_id":"","url":"https://api.github.com/users/tadaskay","html_url":"https://github.com/tadaskay","followers_url":"https://api.github.com/users/tadaskay/followers","following_url":"https://api.github.com/users/tadaskay/following{/other_user}","gists_url":"https://api.github.com/users/tadaskay/gists{/gist_id}","starred_url":"https://api.github.com/users/tadaskay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadaskay/subscriptions","organizations_url":"https://api.github.com/users/tadaskay/orgs","repos_url":"https://api.github.com/users/tadaskay/repos","events_url":"https://api.github.com/users/tadaskay/events{/privacy}","received_events_url":"https://api.github.com/users/tadaskay/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T23:02:24Z","updated_at":"2016-11-17T23:02:24Z","body":"Thank you for taking the time to explain.\r\n\r\n> I meant to put everything related to HelloPlugin in applied.gradle.kts. If that doesn't work, it would be an issue in gradle-script-kotlin, because it does work for Groovy build scripts.\r\n\r\nI have update the sample project and indeed, after moving everything (except for the `applyFrom`) to the `applied.gradle.kts` doesn't work either, so I guess it is a bug after all (a slightly different one)."}}
{"actor":{"display_login":"tadaskay"}}