Closed UpcraftLP closed 6 years ago
You can fix this with some gradle dependsOn stuff.
First let the build depend on signJar:
build.dependsOn signJar
And add in your curseforge block this:
tasks.curseforge.dependsOn build
Here is the whole gradle file:
https://github.com/HyCraftHD/Worldgeneration-Profiler/blob/master/build.gradle#L69-L86
You can fix this with some gradle dependsOn stuff. First let the build depend on signJar: build.dependsOn signJar And add in your curseforge block this: tasks.curseforge.dependsOn build
if you had looked at my gradle build file then you had noticed that I am already doing that, however uploading is done in the project-specific task which is executed BEFORE the sign task.
Thats the strage gradle behaviour of dependencies. Try this tasks.curseforge.dependsOn publish
in or after the curseforge task. Then it should work. (At least for me it does)
I'm seeing the same behavior, but worse...
Correction: I was just seeing the same problem, and the workaround worked for me - thanks @HyCraftHD .
My other issues were caused by my dependencies section using "compile" instead of "deobfCompile" declarations.
fixed it using those two lines on 1.0.11:
tasks.curseforge.mustRunAfter signJar, signDeobfJar, signJavadocJar tasks.curseforge.dependsOn build
when uploading a mod to curseforge the project-specific task is executed before the sign jar task(s) are invoked, leading to uploading unsigned jars.
my current gradle configuration can be found here
Gradle Wrapper 2.14.1 CurseGradle 1.0-SNAPSHOT (also tried 1.0.9 and 1.0.10) ForgeGradle 2.0-SNAPSHOT Forge Mapings: stable_18 MC 1.8.0 Forge 11.14.4.1577
This is a recent gradle build log: gradle.log
I don't really know if this is a real issue or if I just derped when configuring gradle, so sorry if this is my fault, and thanks for the help anyways ;D