dropbox/dropbox-sdk-java

5.4.5 produces compile errors

michaelkircher opened this issue · 8 comments

Switching from 5.4.4, where everything is fine, to 5.4.5 produces multiple build errors:
Caused by: org.gradle.api.internal.artifacts.transform.TransformException: Failed to transform jackson-core-2.15.0.jar (com.fasterxml.jackson.core:jackson-core:2.15.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.

Caused by: java.lang.RuntimeException: Failed to transform '....gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.15.0/12f334a1dc9c6d2854c43ae314024dde8b3ad572/jackson-core-2.15.0.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 63. (Run with --stacktrace for more details.)

Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 63

I use the library in an Android app:
latest Android Studio Giraffe
latest Android SDK 34
latest Gradle 8.1.1

Thanks for the report! I'll ask the team to look into it.

This should be fixed in v5.4.6. Please try that out and let us know if you're still seeing any issues. Thanks!

For me, this issue came back in version 6.0.0 (also seems to affect 7.0.0)

Could not resolve all files for configuration ':app:debugCompileClasspath'.
Failed to transform jackson-core-2.15.0.jar (com.fasterxml.jackson.core:jackson-core:2.15.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Execution failed for JetifyTransform: /Users/james/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.15.0/12f334a1dc9c6d2854c43ae314024dde8b3ad572/jackson-core-2.15.0.jar.
> Failed to transform '/Users/james/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.15.0/12f334a1dc9c6d2854c43ae314024dde8b3ad572/jackson-core-2.15.0.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 63. (Run with --stacktrace for more details.)
Suggestions:
- Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
- If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).
Failed to transform fastdoubleparser-0.8.0.jar (ch.randelshofer:fastdoubleparser:0.8.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Execution failed for JetifyTransform: /Users/james/.gradle/caches/modules-2/files-2.1/ch.randelshofer/fastdoubleparser/0.8.0/85c25540369921659556ead85e02c99ef0d24280/fastdoubleparser-0.8.0.jar.
> Failed to transform '/Users/james/.gradle/caches/modules-2/files-2.1/ch.randelshofer/fastdoubleparser/0.8.0/85c25540369921659556ead85e02c99ef0d24280/fastdoubleparser-0.8.0.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 63. (Run with --stacktrace for more details.)
Suggestions:
- Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
- If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

@jamesncl Please try applying the change mentioned here regarding the "Failed to transform" errors and let us know if you're still seeing the issue. Thanks!

@greg-db Thank you, this seems to have resolved the build error - however with v7.0.0 I now can't seem to reference import com.dropbox.core.android.Auth in order to use Auth.startOAuth2PKCE (has this moved?)

It would be useful if this jackson-core issue and any other breaking changes could be mentioned in the release notes, and perhaps the README updated to fix broken links to a non-existant class Auth.kt, to help others like myself who are trying to upgrade. Thanks!

@jamesncl Thanks for the note. The Android dependencies were split and published as a separate artifact in v6.0.0. Please refer to the changelog here for information on that.

I've also updated the Auth links in the README.

@greg-db ah I had missed the extra dependency for android, thank you.

If I understand correctly, I think that means the following line should be removed from the README?

At this point in time, the Android code is bundled with the main Java artifact, but will be published as a separate artifact at some point in the future.

@jamesncl Yes, that looks out of date, so I've removed it. Thanks!