{"action":"created","issue":{"url":"https://api.github.com/repos/johncarl81/parceler/issues/63","labels_url":"https://api.github.com/repos/johncarl81/parceler/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/johncarl81/parceler/issues/63/comments","events_url":"https://api.github.com/repos/johncarl81/parceler/issues/63/events","html_url":"https://github.com/johncarl81/parceler/issues/63","id":53260695,"number":63,"title":"Getting Parceler to execute on a lib project and the app itself?","user":{"login":"bjornlate","id":4431163,"avatar_url":"https://avatars.githubusercontent.com/u/4431163?v=3","gravatar_id":"","url":"https://api.github.com/users/bjornlate","html_url":"https://github.com/bjornlate","followers_url":"https://api.github.com/users/bjornlate/followers","following_url":"https://api.github.com/users/bjornlate/following{/other_user}","gists_url":"https://api.github.com/users/bjornlate/gists{/gist_id}","starred_url":"https://api.github.com/users/bjornlate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjornlate/subscriptions","organizations_url":"https://api.github.com/users/bjornlate/orgs","repos_url":"https://api.github.com/users/bjornlate/repos","events_url":"https://api.github.com/users/bjornlate/events{/privacy}","received_events_url":"https://api.github.com/users/bjornlate/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-02T16:13:42Z","updated_at":"2015-01-07T17:11:12Z","closed_at":null,"body":"I have a project that uses a shared library project. The library is where the majority of the Parcelables live. I've migrated to Parceler, so far so good :)\r\n\r\nWe also have some code in the app project that I'd like to use Parceler on as well. \r\nEverything compiles and runs, but it appears that the Parcels aren't being generated for the classes in the App project though:\r\n\r\n01-02 11:04:20.060  26765-26765/com.etsy.android.soe.alpha E/AndroidRuntime﹕ FATAL EXCEPTION: main\r\n    org.parceler.ParcelerRuntimeException: Unable to create ParcelableFactory for foo.bar.AClass\r\n            at org.parceler.Parcels$ParcelCodeRepository.get(Parcels.java:198)\r\n            at org.parceler.Parcels.wrap(Parcels.java:85)\r\n            at org.parceler.Parcels.wrap(Parcels.java:69)\r\n...\r\n\r\nI've tried having the provided statement in either gradle files, that seems to determine which project will have Parcels generated... I can't have it in both, I get a dex error.\r\n\r\nAny idea what I'm doing wrong?\r\n "},"comment":{"url":"https://api.github.com/repos/johncarl81/parceler/issues/comments/69054832","html_url":"https://github.com/johncarl81/parceler/issues/63#issuecomment-69054832","issue_url":"https://api.github.com/repos/johncarl81/parceler/issues/63","id":69054832,"user":{"login":"bjornlate","id":4431163,"avatar_url":"https://avatars.githubusercontent.com/u/4431163?v=3","gravatar_id":"","url":"https://api.github.com/users/bjornlate","html_url":"https://github.com/bjornlate","followers_url":"https://api.github.com/users/bjornlate/followers","following_url":"https://api.github.com/users/bjornlate/following{/other_user}","gists_url":"https://api.github.com/users/bjornlate/gists{/gist_id}","starred_url":"https://api.github.com/users/bjornlate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjornlate/subscriptions","organizations_url":"https://api.github.com/users/bjornlate/orgs","repos_url":"https://api.github.com/users/bjornlate/repos","events_url":"https://api.github.com/users/bjornlate/events{/privacy}","received_events_url":"https://api.github.com/users/bjornlate/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T17:11:12Z","updated_at":"2015-01-07T17:11:12Z","body":"With POJOS annotated with @Parcel in both the Library Project and the App Project:\r\n\r\n\r\n1. If I have the compile/provided statements only in the Library's build.gradle, compilation succeeds. $$Parcel wrappers are generated for all the Library POJOs. But none of the POJOs in the App project.\r\nI'll see exceptions like this upon calling Parcels.wrap on App Project POJOS:\r\n    org.parceler.ParcelerRuntimeException: Unable to create ParcelableFactory for   com.android.lib.models.LibPojo\r\n\r\n\r\n2. If I move the \"provided\" statement  to the App Project, compilation succeeds. $$Parcel wrappers are only generated for the App project POJOS, but not the Library POJOS. I'll see the same exception above whenever the Parcels.wrap/unwrap is used on a Lib POJO\r\n\r\n\r\n3. If I add the compile/provided statements to the build.gradle to both the App Project and the library project I get a dex error:\r\n\r\nError:Gradle: Execution failed for task ':dexAlphaDebug'.\r\n> com.android.ide.common.internal.LoggedErrorException: Failed to run command:\r\n  \t/Users/sbirksted/development/android-sdk-macosx/build-tools/21.1.1/dx -JXmx2g --dex --no-optimize --output /MyProject/build/intermediates/dex/alpha/debug --input-list=/MyProject/build/intermediates/tmp/dex/alpha/debug/inputList.txt\r\n  Error Code:\r\n  \t2\r\n  Output:\r\n  \tUNEXPECTED TOP-LEVEL EXCEPTION:\r\n  \tcom.android.dex.DexException: Multiple dex files define Lorg/parceler/Parceler$$Parcels$1;\r\n  \t\tat com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)\r\n  \t\tat com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)\r\n  \t\tat com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)\r\n  \t\tat com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)\r\n  \t\tat com.android.dx.merge.DexMerger.merge(DexMerger.java:189)\r\n  \t\tat com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)\r\n  \t\tat com.android.dx.command.dexer.Main.runMonoDex(Main.java:302)\r\n  \t\tat com.android.dx.command.dexer.Main.run(Main.java:245)\r\n  \t\tat com.android.dx.command.dexer.Main.main(Main.java:214)\r\n  \t\tat com.android.dx.command.Main.main(Main.java:106)\r\n\r\n\r\nNot sure if this is something to do with our setup or Parceler.\r\n\r\n"}}