CurseGradle icon indicating copy to clipboard operation
CurseGradle copied to clipboard

Can not upload file

Open Cjsah opened this issue 3 years ago • 7 comments

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

Cjsah avatar Jan 01 '22 08:01 Cjsah

same

PinkGoosik avatar Jan 08 '22 13:01 PinkGoosik

same

SolidBlock-cn avatar Nov 13 '22 06:11 SolidBlock-cn

same

you should use this instead https://github.com/CDAGaming/CurseGradle

PinkGoosik avatar Nov 13 '22 06:11 PinkGoosik

OK I'll see that. Thanks.

SolidBlock-cn avatar Nov 13 '22 06:11 SolidBlock-cn

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.

SolidBlock-cn avatar Nov 13 '22 06:11 SolidBlock-cn

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.

SolidBlock-cn avatar Nov 13 '22 06:11 SolidBlock-cn

oh damn well I can also recommend looking into https://github.com/Kir-Antipov/mc-publish

PinkGoosik avatar Nov 13 '22 06:11 PinkGoosik