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

Not working with Gradle Plugin 3.4.1 and gradle 5.1.1 #230

Closed
lexy1105 opened this issue Jun 3, 2019 · 7 comments
Closed

Not working with Gradle Plugin 3.4.1 and gradle 5.1.1 #230

lexy1105 opened this issue Jun 3, 2019 · 7 comments

Comments

@lexy1105
Copy link

lexy1105 commented Jun 3, 2019

No description provided.

@lexy1105
Copy link
Author

lexy1105 commented Jun 3, 2019

When i try use logansquare recently, i got this error
http://prntscr.com/nwsuck
Please check and let me know
Maybe fasterxml-jackson-core:2.5.1 is not compatible with gradle plugin 3.4.1 and gradle 5.1.1
Please check and let me know
Thanks

@elephant-cf
Copy link

elephant-cf commented Jun 6, 2019

I have a project with settings
com.android.tools.build:gradle:3.3.2
and
distributionUrl=https://services.gradle.org/distributions/gradle-4.10.1-all.zip
It builds succesffully.

When i change settings to com.android.tools.build:gradle:3.4.1 and
distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip
build fault.

"Maybe fasterxml-jackson-core:2.5.1 is not compatible with gradle plugin 3.4.1 and gradle 5.1.1"

No. I' ve got another errors. The project does not use fasterxml-jackson-core directly
The compiler gives an error that does not exist generated parser classes (NoClassDefFoundError)

@markproxy
Copy link

markproxy commented Jun 13, 2019

I see the same "cannot find symbol" errors shown in the screenshot posted by @yang511, for the JsonParser and JsonGenerator classes in com.fasterxml.jackson.core that are referenced from logansquare's ObjectMapperInjector class. The logansquare project does use fasterxml-jackson-core directly; it's referenced in core/build.gradle: compile 'com.fasterxml.jackson.core:jackson-core:2.5.1'.

I don't understand the exact nature of the incompatibility yet, but it definitely seems related to fasterxml-jackson-core.

@markproxy
Copy link

markproxy commented Jun 13, 2019

I was able to get the build to work by explicitly including my own dependency on jackson-core:2.5.1 in my project's build.gradle file:

    implementation 'com.bluelinelabs:logansquare:1.3.7' // LoganSquare runtime library
    implementation 'com.fasterxml.jackson.core:jackson-core:2.5.1' // Dependency of LoganSquare no longer detected automatically by gradle
    kapt 'com.bluelinelabs:logansquare-compiler:1.3.7'
    kapt 'com.fasterxml.jackson.core:jackson-core:2.5.1'

I suspect the issue here is that logansquare's compile dependency on jackson-core:2.5.1 is being interpreted by the latest gradle as non-transitive. The core/build.gradle file in the logansquare codebase should be updated to use api instead of compile.

@elephant-cf
Copy link

Works after adding dependency implementation 'com.fasterxml.jackson.core:jackson-core:2.5.1'
Thanks a lot.

@lexy1105
Copy link
Author

OK, thanks

@markproxy
Copy link

@yang511 - I'd recommend keeping this ticket open until LoganSquare's dependency on jackson-core is made transitive. Users of the library shouldn't have to add the dependency to their own projects.

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

3 participants