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

fix: duplicate classes crash on wrappers #239

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

Shahroz16
Copy link
Contributor

@Shahroz16 Shahroz16 commented Jul 13, 2023

While randomly testing react native sample app, which had a lower Kotlin version we bumped into an issue.

Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21)
     Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)

It was caused because lifecycle-runtime-ktx:2.6.1 is being compiled by Kotlin 1.8.10 while, our SDK is being compiled by 1.7.21. So our duplicate kotlin versions were being sent.

So until, we upgrade the kotlin version to 1.8.10, we have to make sure all the dependencies being used are also compiled by our current kotlin version, 1.7.21.

@github-actions
Copy link

github-actions bot commented Jul 13, 2023

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


  • java_layout: shahroz/fix-android-duplicate-classes-error (1689276153)
  • kotlin_compose: shahroz/fix-android-duplicate-classes-error (1689276162)

@github-actions
Copy link

github-actions bot commented Jul 13, 2023

Pull request title looks good 👍!

If this pull request gets merged, it will cause a new release of the software. Example: If this project's latest release version is 1.0.0. If this pull request gets merged in, the next release of this project will be 1.0.1. This pull request is not a breaking change.

All merged pull requests will eventually get deployed. But some types of pull requests will trigger a deployment (such as features and bug fixes) while some pull requests will wait to get deployed until a later time.

This project uses a special format for pull requests titles. Expand this section to learn more (expand by clicking the ᐅ symbol on the left side of this sentence)...

This project uses a special format for pull requests titles. Don't worry, it's easy!

This pull request title should be in this format:

<type>: short description of change being made

If your pull request introduces breaking changes to the code, use this format:

<type>!: short description of breaking change

where <type> is one of the following:

  • feat: - A feature is being added or modified by this pull request. Use this if you made any changes to any of the features of the project.

  • fix: - A bug is being fixed by this pull request. Use this if you made any fixes to bugs in the project.

  • docs: - This pull request is making documentation changes, only.

  • refactor: - A change was made that doesn't fix a bug or add a feature.

  • test: - Adds missing tests or fixes broken tests.

  • style: - Changes that do not effect the code (whitespace, linting, formatting, semi-colons, etc)

  • perf: - Changes improve performance of the code.

  • build: - Changes to the build system (maven, npm, gulp, etc)

  • ci: - Changes to the CI build system (Travis, GitHub Actions, Circle, etc)

  • chore: - Other changes to project that don't modify source code or test files.

  • revert: - Reverts a previous commit that was made.

Examples:

feat: edit profile photo
refactor!: remove deprecated v1 endpoints
build: update npm dependencies
style: run formatter 

Need more examples? Want to learn more about this format? Check out the official docs.

Note: If your pull request does multiple things such as adding a feature and makes changes to the CI server and fixes some bugs then you might want to consider splitting this pull request up into multiple smaller pull requests.

@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Merging #239 (3c1c41b) into main (3f02263) will decrease coverage by 33.27%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##               main     #239       +/-   ##
=============================================
- Coverage     49.65%   16.39%   -33.27%     
+ Complexity      237       59      -178     
=============================================
  Files           108       40       -68     
  Lines          2775     1269     -1506     
  Branches        362      185      -177     
=============================================
- Hits           1378      208     -1170     
+ Misses         1282     1033      -249     
+ Partials        115       28       -87     

see 68 files with indirect coverage changes

@github-actions
Copy link

Build available to test
Version: shahroz-fix-android-duplicate-classes-error-SNAPSHOT
Repository: https://s01.oss.sonatype.org/content/repositories/snapshots/

@Shahroz16 Shahroz16 requested a review from a team July 13, 2023 19:38
@Shahroz16 Shahroz16 merged commit ead2175 into main Jul 13, 2023
26 of 30 checks passed
@Shahroz16 Shahroz16 deleted the shahroz/fix-android-duplicate-classes-error branch July 13, 2023 19:42
github-actions bot pushed a commit that referenced this pull request Jul 13, 2023
### [3.6.2](3.6.1...3.6.2) (2023-07-13)

### Bug Fixes

* duplicate classes crash on wrappers ([#239](#239)) ([ead2175](ead2175))
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

Successfully merging this pull request may close these issues.

None yet

2 participants