Skip to content

Commit

Permalink
fix copyArtifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
DJtheRedstoner committed Jan 1, 2024
1 parent 88e9e47 commit f459740
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ fun Project.configureMcProject() {

fun Project.configureCopyArtifacts() {
val copyArtifacts = tasks.create( "copyArtifacts", Copy::class.java).apply {
dependsOn(tasks.getByName("remapJar"))
from((tasks.getByName("remapJar") as Jar).archiveFile)
into(rootProject.buildDir.resolve("distributions"))
val jarTask = tasks.findByName("remapJar") ?: tasks.findByPath("jar") ?: error("couldn't find jar task")
from((jarTask as Jar).archiveFile)
into(rootProject.layout.buildDirectory.dir("distributions"))
}
tasks.getByName("assemble").dependsOn(copyArtifacts)
}
Expand Down

0 comments on commit f459740

Please sign in to comment.