{"action":"created","issue":{"url":"https://api.github.com/repos/jaredsburrows/gradle-spoon-plugin/issues/12","repository_url":"https://api.github.com/repos/jaredsburrows/gradle-spoon-plugin","labels_url":"https://api.github.com/repos/jaredsburrows/gradle-spoon-plugin/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/jaredsburrows/gradle-spoon-plugin/issues/12/comments","events_url":"https://api.github.com/repos/jaredsburrows/gradle-spoon-plugin/issues/12/events","html_url":"https://github.com/jaredsburrows/gradle-spoon-plugin/issues/12","id":278929327,"number":12,"title":"GStringImpl cannot be cast to java.lang.String","user":{"login":"hram","id":2150637,"avatar_url":"https://avatars3.githubusercontent.com/u/2150637?v=4","gravatar_id":"","url":"https://api.github.com/users/hram","html_url":"https://github.com/hram","followers_url":"https://api.github.com/users/hram/followers","following_url":"https://api.github.com/users/hram/following{/other_user}","gists_url":"https://api.github.com/users/hram/gists{/gist_id}","starred_url":"https://api.github.com/users/hram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hram/subscriptions","organizations_url":"https://api.github.com/users/hram/orgs","repos_url":"https://api.github.com/users/hram/repos","events_url":"https://api.github.com/users/hram/events{/privacy}","received_events_url":"https://api.github.com/users/hram/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-12-04T09:40:22Z","updated_at":"2017-12-11T16:43:08Z","closed_at":null,"author_association":"NONE","body":"If I set instrumentationArgs in gradle file like this:\r\n\r\n> instrumentationArgs = [\"package:hram.testspoon.package1\"]\r\n\r\nall works correct\r\n\r\nbut I need to pass apguments from command line and if I add code like this\r\n\r\n> if (project.hasProperty('spoonPackageName')) {\r\n        instrumentationArgs = [\"package:${project.getProperty('spoonPackageName')}\"]\r\n    }\r\n\r\nthen I have exception\r\n\r\n> Caused by: java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String\r\n        at com.jaredsburrows.spoon.SpoonTask.spoonTask(SpoonTask.kt:111)\r\n        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)\r\n\r\nCan you help me please?"},"comment":{"url":"https://api.github.com/repos/jaredsburrows/gradle-spoon-plugin/issues/comments/350781713","html_url":"https://github.com/jaredsburrows/gradle-spoon-plugin/issues/12#issuecomment-350781713","issue_url":"https://api.github.com/repos/jaredsburrows/gradle-spoon-plugin/issues/12","id":350781713,"user":{"login":"jaredsburrows","id":1739848,"avatar_url":"https://avatars0.githubusercontent.com/u/1739848?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredsburrows","html_url":"https://github.com/jaredsburrows","followers_url":"https://api.github.com/users/jaredsburrows/followers","following_url":"https://api.github.com/users/jaredsburrows/following{/other_user}","gists_url":"https://api.github.com/users/jaredsburrows/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredsburrows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredsburrows/subscriptions","organizations_url":"https://api.github.com/users/jaredsburrows/orgs","repos_url":"https://api.github.com/users/jaredsburrows/repos","events_url":"https://api.github.com/users/jaredsburrows/events{/privacy}","received_events_url":"https://api.github.com/users/jaredsburrows/received_events","type":"User","site_admin":false},"created_at":"2017-12-11T16:43:08Z","updated_at":"2017-12-11T16:43:08Z","author_association":"OWNER","body":"What was the error? Both should work, here is a test I have that covers this: https://github.com/jaredsburrows/gradle-spoon-plugin/blob/master/src/test/groovy/com/jaredsburrows/spoon/SpoonPluginSpec.groovy#L60."}}
{"actor":{"display_login":"jaredsburrows"}}