import io.gitlab.jfronny.scripts.* plugins { id("jf.autoversion") id("jfmod.module") } val args = extensions.create("jfMod") legacyCheck(args) earlyAfterEvaluate { args.check(project) if (args.curseforge.projectId.isPresent) apply(plugin = "jfmod.curseforge") if (args.modrinth.projectId.isPresent) apply(plugin = "jfmod.modrinth") } val moveArtifacts by tasks.registering(Copy::class) { val suffix = if (flavour.isEmpty()) "" else "-$flavour" val sources = mapOf("latest$suffix.jar" to tasks.remapJar, "latest$suffix-dev.jar" to tasks.shadowJar) for (source in sources) { from(source.value.map { it.archiveFile }) { this.rename { source.key } } dependsOn(source.value) } into(buildDir.resolve("artifacts")) } tasks.deployDebug.dependsOn(moveArtifacts)