PaperMC/paperweight

Publish reobfuscated jar

Placeblock opened this issue · 4 comments

I am currently developing an API for spigot, which I want to publish on a Nexus Repository.
However Nexus complains about not finding the main jar file.
This makes sense because it publishes only the -dev.jar file.
In my publish configuration I set the java component to be published by using from(components["java"])
Is there any way to publish the unobfuscated version but without the -dev?

If I understood things wrong I apologize and hope for help :)
Have a great day 😃

basically, technically, yes; youd' need to figure out how to tell it to publish the artifact without a classifier; but, generally, we don't recommend doing that, just specify the dev classifier when targeting it

Appreciate your fast response ;)

I now understood that i shouldn't replace the non-dev version with the dev version but specify the classifier.
However i cannot publish the artifact at all, because the non-dev version doesn't get published which the Nexus repository needs.
As i understood it the dev-version is the unobfuscated version and the non-dev version is the reobf. version...
Why is the reobf. version not included in the java component? Can i include it somehow?

Thanks for your help 😃!

Currently i configured the reobfJar to run always after the jar task, which means if i build the project it creates the reobf. Jar. If i publish it, it creates the reobfuscated jar before signing and publishing. However the reobf. jar still doesn't end up in the remaining task chain. (At least i think so because it doesn't get published).

See #137 (comment) and #177; Changes to how userdev interacts with publishing are planned, but there's significant work and decisions to be made.