Can not upload file
build.gradle
curseforge {
def envApiKey = ENV.CURSEFORGE_TOKEN
apiKey = envApiKey == null ? 'nope' : envApiKey
project {
id = project.curse_id
releaseType = project.curse_type
changelog = project.curse_changelog
project.curse_versions.split(", ").each {
String gameVersion -> addGameVersion gameVersion
}
mainArtifact(jar) {
displayName = "$project.name v$SemVer_version for mc$project.mc_version"
}
}
}
$ gradle curseforge
> Configure project :
[MixinGradle] Skipping eclipse integration, extension not found
Java: 17.0.1 JVM: 17.0.1+12(Eclipse Adoptium) Arch: amd64
> Task :downloadMcpConfig
> Task :extractSrg UP-TO-DATE
> Task :createMcpToSrg UP-TO-DATE
> Task :compileJava UP-TO-DATE
> Task :addMixinsToJar
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :jar
> Task :configureReobfTaskForReobfJar
> Task :reobfJar
> Task :assemble
> Task :curseforge547361 FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
10 actionable tasks: 6 executed, 4 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':curseforge547361'.
> [CurseForge] HTTP Error Code 403: Forbidden
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 12s
Keep reporting errors [CurseForge] HTTP Error Code 403: Forbidden
same
same
same
you should use this instead https://github.com/CDAGaming/CurseGradle
OK I'll see that. Thanks.
I suspect the issue is in Util.httpGet. It tried to get with the same url and apiKey in my browser and it responded correctly. However, if I execute through Util.httpGet, 403 is responeded instead.
same
you should use this instead https://github.com/CDAGaming/CurseGradle
I tried the CDAGaming's CurseGradle 1.6.0 however the same issue happens.
oh damn well I can also recommend looking into https://github.com/Kir-Antipov/mc-publish