czyzby/gdx-lml

Malformed snapshot JAR

metaphore opened this issue · 8 comments

Hey @czyzby,
Sorry to bother you again with that nasty problem, but it seems that the latest published snapshot jar gdx-lml-1.9.1.9.10-20190822.134652-9.jar is somehow malformed and weights only a few bites. Compare it to some other old ones - https://oss.sonatype.org/content/repositories/snapshots/com/github/czyzby/gdx-lml/1.9.1.9.10-SNAPSHOT/

I think it might have been caused by Gradle version change. For some reason it seems to build 2 jars for LML at some point and an empty jar overrides the correct one. You can see it clearly in the distribution archive:

image

Coincidentally, this seems to happen only for modules that share a prefix with other libraries (i.e. gdx-autumn, gdx-websocket, gdx-lml).

What's weird, lml and other libraries have correct jars in their build directories. When I upload them separately, everything seems to be OK. When I push them with uploadArchives in root directory, the overridden jar is uploaded. My guess is that the libraries are incorrectly referenced in Gradle files (as libraries instead of project references), but then again - this would also affect Kiwi in such case.

Anyway, I think I uploaded the correct versions. I'd appreciate if you verified this @metaphore and checked the Gradle configuration, if you have the time.

All good with maven now, thanks!

Hm, I didn't have the same problem in my fork. When I run :installAll I can see that all the modules get assembled correct.
I remember the project wasn't configured with Gradle wrapper. Do you use system installed Gradle?

No, I used the wrapper. Can you check if zip archive in build/distributions has duplicate entries?

Sorry, I'm not sure where to look for that dir, I don't have it anywhere in the project after clean build.

@metaphore Run ./gradlew build distZip, check build/distributions in the project root folder.

I'm going to close this for now and write a small script to upload the archives separately. I'd appreciate if you checked the distribution archives @metaphore as described in the previous comment.

@czyzby very sorry about a late response, checked it in the first place and completely forgot to leave a message.
And yes, you're right, I can see the duplicated entries in the archive:
image

Not sure what causes this issue, maybe need to play with Gradle configuration to see when it happens.

It's OK, thanks for the confirmation. The fastest fix would probably be to downgrade Gradle, but I'm not sure we want to do that just yet. Converting the references between modules from compile to standard project tags could help the issue.