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

Chucker 3.3.0 is incompatible with projects using Kotlin 1.4.20 and @Parcelize #480

Closed
ephemient opened this issue Oct 20, 2020 · 2 comments · Fixed by #481
Closed

Chucker 3.3.0 is incompatible with projects using Kotlin 1.4.20 and @Parcelize #480

ephemient opened this issue Oct 20, 2020 · 2 comments · Fixed by #481
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ephemient
Copy link

ephemient commented Oct 20, 2020

✍️ Describe the bug

@Parcelize has moved out of the Kotlin Android Extensions (which is deprecated) into its own compiler plugin. It's using a different package name, but the new runtime still defines the old classes to provide deprecation errors. With both the old and new runtimes defining the same classes, this causes Android's checkDebugDuplicateClasses build task to fail.

💣 Steps to reproduce

  1. Create Android application using Kotlin 1.4.20-M2 (or whatever version is now available) and using plugins { kotlin("plugin.parcelize") }.
  2. Add Chucker 3.3.0.
  3. Try to build.
  4.  > Task :app:checkDebugDuplicateClasses FAILED
    
     FAILURE: Build failed with an exception.
    
     * What went wrong:
     Execution failed for task ':app:checkDebugDuplicateClasses'.
     > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
        > Duplicate class kotlinx.android.parcel.IgnoredOnParcel found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-M2 (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-M2)
          Duplicate class kotlinx.android.parcel.Parceler found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-M2 (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-M2)
          Duplicate class kotlinx.android.parcel.Parceler$DefaultImpls found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-M2 (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-M2)
          Duplicate class kotlinx.android.parcel.Parcelize found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-M2 (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-M2)
          Duplicate class kotlinx.android.parcel.RawValue found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-M2 (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-M2)
          Duplicate class kotlinx.android.parcel.TypeParceler found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-M2 (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-M2)
          Duplicate class kotlinx.android.parcel.WriteWith found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-M2 (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-M2)
    
          Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
    

🔧 Expected behavior

Success

📷 Screenshots

📱 Tech info

  • Device:
  • OS:
  • Chucker version:

📄 Additional context

@vbuberen
Copy link
Collaborator

Thanks for reporting the issue.

I thought we removed kotlin-android-extensions plugin at all when migrated to ViewBinding. Seems I confused with other projects where I removed this plugin completetly.

We will fix it and release in 3.3.1 along with some other important fixes before final 1.4.20 Kotlin released.

@vbuberen vbuberen added the bug Something isn't working label Oct 20, 2020
@vbuberen vbuberen self-assigned this Oct 20, 2020
@ghost ghost added the Pending PR The resolution for the issue is in PR label Oct 20, 2020
@cortinico cortinico added this to the 3.3.1 milestone Oct 20, 2020
@ghost ghost removed the Pending PR The resolution for the issue is in PR label Oct 21, 2020
@vbuberen
Copy link
Collaborator

@ephemient You can switch to the latest snapshot version for now, since we just merged the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants