matthewprenger / CurseGradle

Gradle plugin to upload Minecraft mods to CurseForge
MIT License
2 stars 1 forks source link

use shadowJar / reobfShadowJar #13

Closed NikkyAI closed 6 years ago

NikkyAI commented 6 years ago

i am shading in libraries and relocating them with shadowJar

i tried

mainArtifact(shadowJar) {
    displayName = "MatterLink $version"
}

and tasks.reobfShadowJar.mustRunAfter shadowJar but it seems that task does not reobsfucate the jar properly and the reobfShadowJar task does not return a file

TehNut commented 6 years ago

What does this have to do with CurseGradle?

NikkyAI commented 6 years ago

i was asking for how to use it with cursegradle.. but it ended up gradle being just a bit weird.. i solved it

this did the trick for me

tasks.shadowJar.finalizedBy reobfShadowJar

curseforge {
    if (project.hasProperty('CURSEFORGE_API_TOKEN') && project.hasProperty('release')) {
        apiKey = CURSEFORGE_API_TOKEN
    }
    project {
        id = project.curse_id
        releaseType = project.curse_release_type
        mainArtifact(shadowJar) {
            displayName = "$rootProject.name-$version"
        }
    }
}