{"action":"closed","issue":{"url":"https://api.github.com/repos/square/retrofit/issues/1671","repository_url":"https://api.github.com/repos/square/retrofit","labels_url":"https://api.github.com/repos/square/retrofit/issues/1671/labels{/name}","comments_url":"https://api.github.com/repos/square/retrofit/issues/1671/comments","events_url":"https://api.github.com/repos/square/retrofit/issues/1671/events","html_url":"https://github.com/square/retrofit/issues/1671","id":140526632,"number":1671,"title":"Incomplete proguard configuration on website when using Call<Model>","user":{"login":"mattijsf","id":706368,"avatar_url":"https://avatars.githubusercontent.com/u/706368?v=3","gravatar_id":"","url":"https://api.github.com/users/mattijsf","html_url":"https://github.com/mattijsf","followers_url":"https://api.github.com/users/mattijsf/followers","following_url":"https://api.github.com/users/mattijsf/following{/other_user}","gists_url":"https://api.github.com/users/mattijsf/gists{/gist_id}","starred_url":"https://api.github.com/users/mattijsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattijsf/subscriptions","organizations_url":"https://api.github.com/users/mattijsf/orgs","repos_url":"https://api.github.com/users/mattijsf/repos","events_url":"https://api.github.com/users/mattijsf/events{/privacy}","received_events_url":"https://api.github.com/users/mattijsf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-13T20:36:37Z","updated_at":"2016-04-16T03:58:18Z","closed_at":"2016-04-16T03:58:18Z","body":"The proguard configuration on the website is missing some critical information when using the Callback response handler.\r\n\r\nFor example when using the following resource:\r\n`Call<com.example.model.proto.RegistrationResponse> register(@Body com.example.model.proto.RegistrationRequest);`\r\n\r\nRetrofit's `createCallAdapter` that uses `Method.getGenericReturnType()` will return `java.lang.Object` even though I set proguard to use `-keepattributes Signature`\r\n\r\nIn order to fix this I need to add this to the proguard configuration:\r\n`-keep class com.example.model.proto.** { *; }`\r\n\r\nError when above -keep rule is omitted:\r\n```\r\njava.lang.IllegalArgumentException: Unable to create converter for class java.lang.Object\r\n  for method Registration.register\r\n  at retrofit2.Utils.methodError(Utils.java:154)\r\n  at retrofit2.MethodHandler.createResponseConverter(MethodHandler.java:62)\r\n  at retrofit2.MethodHandler.create(MethodHandler.java:33)\r\n  at retrofit2.Retrofit.loadMethodHandler(Retrofit.java:164)\r\n  at retrofit2.Retrofit$1.invoke(Retrofit.java:145)\r\n  at java.lang.reflect.Proxy.invoke(Proxy.java:393)\r\n```\r\n\r\nThis is currently my (working) proguard configuration:\r\n```\r\n# retrofit\r\n-dontwarn retrofit2.**\r\n-keep class retrofit2.** { *; }\r\n-keepattributes Signature\r\n-keepattributes Exceptions\r\n# line below is required when using Call<com.example.model.proto.*> with retrofit\r\n-keep class com.example.model.proto.** { *; } \r\n```\r\n"}}