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

Cannot build with Java 8, which breaks some CI builds #281

Closed
nokite opened this issue Nov 29, 2021 · 4 comments
Closed

Cannot build with Java 8, which breaks some CI builds #281

nokite opened this issue Nov 29, 2021 · 4 comments

Comments

@nokite
Copy link

nokite commented Nov 29, 2021

  • Lib Version 3.3.6

Describe the bug
The build fails on machines that have Java 8

To Reproduce

  1. Take an Android project that successfully builds on a particular machine with JDK 8.
  2. The project targets Java 8 (1.8). It uses gradle plugin 4.2.2, gradle 6.9, jettifier (with desugar_jdk_libs)
  3. Add the Android-Image-Cropper library to the project.
  4. Start a build on the CI and see the results - the build fails (see the log below)

Expected behavior
The build should succeed, the same way as before adding the library.

Additional context

> Task :app:kaptDevelopmentDebugKotlin
/.../app/build/generated/data_binding_base_class_source_out/developmentDebug/out/.../databinding/ActivityImageCropperBinding.java:13: error: cannot access CropImageView
import com.canhub.cropper.CropImageView;
                         ^
  bad class file: /private/var/root/.gradle/caches/transforms-3/fbc.../transformed/jetified-Android-Image-Cropper-3.3.6-api.jar(com/canhub/cropper/CropImageView.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

Version 55 corresponds to Java 11, and 52 corresponds to Java 8.

@nokite nokite added the bug label Nov 29, 2021
@Canato
Copy link
Member

Canato commented Nov 30, 2021

Please check #260 and let me know what you think =D

@nokite
Copy link
Author

nokite commented Nov 30, 2021

@Canato Thanks for the link!
(my initial search filter had "is:open", which mislead me and I thought this hadn't been reported)

The change to the updated stack is a good thing, but I think it may have been premature (Java Android 12 + Gradle 7.0.1 + Java 11). It's probably better to keep the library compatible for a while.
I have no idea if compatibility with Java 8 can be ensured with the new stack.

It may be helpful to mention this limitation in the Readme for a few months, while the industry is transitioning to the updated stack.

@Canato
Copy link
Member

Canato commented Nov 30, 2021

Indeed is always two face situation, where some people wanna this update and some wanna keep the support.

We decide to update so everyone can have a version that can use.
Who are not using the latest gradle and java suggested by google can use the old library versions like 3.2.2 and can even branch from it to keep the support.

Who update can get the latest with the latest updates.

Of course I'm open to have both working, just not sure how to do it X'D.

But I believe the best would be people branch 3.2.2 and create 3.2.3, 3.2.4 etc when needed. If we have people supporting a second main branch with Java 8 we can add clear instructions for it.

You are right, the README is wrong, will update on the branch i'm working #275 thanks for spotting it 🚀

@stale
Copy link

stale bot commented Dec 14, 2021

Let's keep this mess organised! This issue has been automatically marked as stale because it has not had recent activity. =( It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 14, 2021
@stale stale bot closed this as completed Dec 21, 2021
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