EasyPost / easypost-java

EasyPost Shipping API Client Library for Java
https://easypost.com/docs/api
MIT License
54 stars 37 forks source link

Compile Issue / Need Version Advice #281

Closed sr-monika closed 1 year ago

sr-monika commented 1 year ago

Hi there

I am a developer with FedEx involved in integrating one of our services with EasyPost.

We have an old code base written in Kotlin that is compiled to Java 1.8. Adding your latest version produces a very strange issue with our build system. The error goes away when we depend on implementation "com.easypost:easypost-api-client:5.0.0" instead of implementation "com.easypost:easypost-api-client:6.8.0"

there seem to be significant changes in the library that we would have to adapt to if we go back so far in the versions Can you see another approach - short of upgrading our application to a newer java version ?

Thanks

Monika

Here the specifics as it happens on my local

I am using Gradle:

Gradle 5.4

Build time: 2019-04-16 02:44:16 UTC Revision: a4f3f91a30d4e36d82cc7592c4a0726df52aba0d

Kotlin: 1.3.21 Groovy: 2.5.4 Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018 JVM: 18.0.2.1 (Oracle Corporation 18.0.2.1+1-1) OS: Mac OS X 13.5 aarch64

added the dependency

implementation "com.easypost:easypost-api-client:6.8.0" when running ./gradlew build --stacktrace. we get the error below

implementation "com.easypost:easypost-api-client:5.0.0" when running ./gradlew build. it succeeds (in the sense that we get proper compile errors)

FAILURE: Build failed with an exception.

nwithan8 commented 1 year ago

Hello, thanks for reaching out!

Our CI process runs our library against Java 8-current (21), so I can confirm that our library is compatible with Java 1.8/8.

Doing some light Googling, it seems the error may have to do with the version of Gradle you're using, rather than specifically something with our library, although we'll continue looking.

Off the top of my head, I don't recall any changes to Java or Gradle-related aspects between v5 and v6, other than dependency bumps.

sr-monika commented 1 year ago

and you are right - the solution is - adding this to our build.gradle

dependencyManagement { applyMavenExclusions = false }