Android project: 1.0.0RC - Need gradle 6.1.1, does not work with 5.6.4
See original GitHub issueSince upgrade from 0.20.0 to 1.0.0-RC along with Kotlin to 1.4.0 the application fails to build with multiple errors in ::sample:checkDebugDuplicateClasses
task with messages like:
java.lang.RuntimeException:
Duplicate class kotlinx.serialization.AbstractSerialFormat found in modules
jetified-kotlinx-serialization-core-jvm-1.0.0-RC.jar (org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.0.0-RC) and
jetified-kotlinx-serialization-core-jvm-1.0.0-RC.jar (org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0-RC)
It seems the problem is actual with gradle 5.6.4 and a workaround by upgrading to 6.1.1 fixes the problem. However this bump of major gradle version may not be that easy in many cases. Is it intended or is it a bug? The need for gradle upgrade is not mentioned in migration guide explicitly.
To Reproduce A sample application using the library with kotlinx.serialization dependency.
- include the library to see build failure. Commit
- Update gradle to 6.1.1 - build passes. Commit
The library using serialization could be found in the same repository. Here is how the dependency is configured.
Environment
- Kotlin version: 1.4.0
- Library version: 1.0.0-RC
- Kotlin platforms: JVM (Android)
- Gradle version: 5.6.4/6.1.1
- AGP 3.6.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Minimum supported Gradle version is 6.1.1. Current version is ...
I faced this error. so I added the line below to build.gradle(project) file , dependency part:.
Read more >Upgrading your build from Gradle 6.x to the latest
Try to run the project and debug any errors using the Troubleshooting Guide. ... The migration can be performed per configuration and does...
Read more >Android Gradle plugin release notes - Android Developers
The Android Studio build system is based on Gradle, and the Android Gradle plugin adds several features that are specific to building Android...
Read more >Gradle Docker Plugin User Guide & Examples - GitHub Pages
This plugin requires Gradle >= 5.2 to work properly. ... Managing a Docker Swarm and/or Stack is not supported.
Read more >Spring Boot Gradle Plugin Reference Guide
Spring Boot's Gradle plugin requires Gradle 7.x (7.5 or later) and can ... Overriding versions may cause compatibility issues and should be ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For 1.0 release the maven coordinates were updated (along with many other parts of the api), so runtime no longer exists as a coordinate, but now is -core. -json provides the json format, but pulls in core transitively
I have this issue with Gradle 6.5 and 6.6.1