kenglxn / QRGen

a simple QRCode generation api for java built on top ZXING
http://glxn.net/2012/03/10/qrgen-a-small-wrapper-on-top-of-zxing-for-generating-qrcodes-in-java
1.49k stars 299 forks source link

Could not find com.github.kenglxn.QRGen:javase:3.0.0. #155

Closed DavidR-sevenbel closed 1 year ago

DavidR-sevenbel commented 1 year ago

Dependabot tried to update us to the newest version of this library (2.6.0 to 3.0.0). This is the full changelog:

-    implementation "com.github.kenglxn.QRGen:javase:2.6.0"
+    implementation "com.github.kenglxn.QRGen:javase:3.0.0"

We're now getting an error during compile time.

> Task :Generator:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':Generator:compileJava'.
> Could not resolve all files for configuration ':Generator:compileClasspath'.
   > Could not find com.github.kenglxn.QRGen:javase:3.0.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/kenglxn/QRGen/javase/3.0.0/javase-3.0.0.pom
       - https://repo.maven.apache.org/maven2/com/github/kenglxn/QRGen/javase/3.0.0/javase-3.0.0.pom
       - https://jitpack.io/com/github/kenglxn/QRGen/javase/3.0.0/javase-3.0.0.pom
     Required by:
         project :Generator

It seems that the module javase is not available on jitpack.io This can also be seen here: https://jitpack.io/#kenglxn/QRGen/3.0.0 where no subprojects can be selected, and the recommended gradle include shorthand is 'com.github.kenglxn:QRGen:3.0.0'.

When we change the dependency in our build gradle file to this, it can find the dependency, BUT none of our import statements in the java code work anymore. (e.g. Intellij cannot find any QRCode class to import)

Is this expected behaviour?
If yes, can you please provide a migration path

kenglxn commented 1 year ago

Thanks for letting me know. I’ll take a look.

kenglxn commented 1 year ago

May be an issue with java 11. Could you try 2.7.0, which is the same but compiled for java 1.8. I’ll look into the issue as soon as possible.

kenglxn commented 1 year ago

Jitpack builds with java 8 by default, so the 3.0.0 tag was failing build on jitpack, which is why the group id is missing.

I tried retagging and rereleasing the 3.0.0 version, but does not look like that helped the build on jitpack.

I rerelased it as 3.0.1 which should fix the issue. https://jitpack.io/#kenglxn/QRGen/3.0.1

kenglxn commented 1 year ago

3.0.0 is now rebuilt and available: https://jitpack.io/#kenglxn/QRGen/3.0.0

DavidR-sevenbel commented 1 year ago

sorry for the late reply

3.0.1 looks like it works for us thanks for the quick fix :+1: