Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use ParcelClass in multi-module project? #377

Open
bhargavms opened this issue Dec 16, 2019 · 2 comments
Open

How to use ParcelClass in multi-module project? #377

bhargavms opened this issue Dec 16, 2019 · 2 comments

Comments

@bhargavms
Copy link

bhargavms commented Dec 16, 2019

Lets say I have structure like below in multi module project

JVM external library A {
  class City()
}

Android Module B {
   @ParcelClass(value = City, converter=BlahConverter::class)
   data class Professor(val city: CIty)
}

Android Module C {
   @ParcelClass(value = City, converter=BlahConverter::class)
    data class Professor(val city: CIty)
}

Now when I assemble this, D8 will complain that program type already present for class City$$Parcelable how do i make this work?

@johncarl81
Copy link
Owner

Hmm, looks like Module B and C depend on A right? Perhaps define the @ParcelClass in Module A once and just use it from modules B and C?

@bhargavms
Copy link
Author

bhargavms commented Dec 20, 2019

that doesnt work because the jvm module A, is an external library , i will update the question pseudocode,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants