Skip to content

Commit

Permalink
sorry))
Browse files Browse the repository at this point in the history
  • Loading branch information
nekit508 committed Aug 3, 2024
1 parent 652e3f1 commit f72d154
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,24 @@ configure(rootProject){
command.execute(null, layout.projectDirectory.asFile).waitForProcessOutput(System.out, System.err)
}
}
}
}

for(def i = 0; i < 2; i++){
final def isDex = i == 1
final def name = isDex ? 'installDex' : 'install'
final def input = isDex ? tasks.dex : tasks.jar

tasks.register(name){
inputs.files input
doLast{
def folder = Fi.get(OS.getAppDataDirectoryString('Mindustry')).child('mods')
folder.mkdirs()

folder.child(tasks.jar.archiveFileName.get()).delete()
folder.child(tasks.dex.archiveFileName.get()).delete()

new Fi(input.archiveFile.get().asFile).copyTo(folder)
logger.log(LogLevel.LIFECYCLE, "Copied :${isDex ? 'dex' : 'jar'} output to $folder.")
}
}
}

0 comments on commit f72d154

Please sign in to comment.