matthewprenger / CurseGradle

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

Fabric compat #31

Open Martmists-GH opened 4 years ago

Martmists-GH commented 4 years ago

Fabric has tasks that run after assemble, causing issues with cursegradle.

matthewprenger commented 4 years ago

I don't have any strong opinions here, but the Gradle documentation suggests that attaching to the build task not generally recommended.

build — lifecycle task Depends on: check, assemble

Intended to build everything, including running all tests, producing the production artifacts and generating documentation. You will probably rarely attach concrete tasks directly to build as assemble and check are typically more appropriate.

Would running .\gradlew build curseforge not solve this issue? Since build would be on the task graph, the cursegradle tasks would depend on it via the mustRunAfter dependency. Really I feel like Fabric should be done with it's artifact tasks before assemble is complete.

assemble — lifecycle task Plugins and build authors should attach tasks that produce distributions and other consumable artifacts to this lifecycle task. For example, jar produces the consumable artifact for Java libraries. Attach tasks to this lifecycle task using assemble.dependsOn(task).