Pam's HarvestCraft

Pam's HarvestCraft

87M Downloads

Modfiles not named as expected for CurseForge maven API

0xlsca opened this issue ยท 0 comments

commented

CurseForge provides us with a Maven-endpoint which we can use in Gradle for dependency management. It seems to be relying on mod authors naming their files in some way according to the api documentation.

Using this tool I managed to be able to retrieve Maven urls and Gradle deps for other mods quite well. That was until I tried it with harvestcraft and failed, which is because several Maven attributes seem to be usually located in the artifact name / mod filename and separated by -. The Harvestcraft modfiles lack this delimiter, however, and even adding in the delimiter via debugging the helper sourcecode and other shots in the dark yielded nothing valuable.

Example:
https://minecraft.curseforge.com/projects/rustic/files/2615155

yields

URL:
https://minecraft.curseforge.com/api/maven/rustic/rustic/1.0.9/rustic-1.0.9.jar


Gradle:
deobfCompile "rustic:rustic:1.0.9"

https://minecraft.curseforge.com/projects/cofhcore/files/2586247

yields

URL:
https://minecraft.curseforge.com/api/maven/cofhcore/CoFHCore-1.12.2/4.5.3.20/CoFHCore-1.12.2-4.5.3.20-universal.jar


Gradle:
deobfCompile "cofhcore:CoFHCore-1.12.2:4.5.3.20:universal"

(all results obtained via using the CF/Maven-Helper)