mirror of
https://github.com/GayPizzaSpecifications/foundation.git
synced 2025-09-16 16:41:32 +00:00
Gradle: Utilize Gradle plugin creation DSL.
This commit is contained in:
@ -59,7 +59,7 @@ open class SetupPaperServer : DefaultTask() {
|
||||
val build = builds.last()
|
||||
val download = build.downloads["application"]!!
|
||||
val url = paperVersionClient.resolveDownloadUrl(build, download)
|
||||
val downloader = SmartDownload(paperJarFile.toPath(), url, download.sha256)
|
||||
val downloader = SmartDownloader(paperJarFile.toPath(), url, download.sha256)
|
||||
if (downloader.download()) {
|
||||
logger.lifecycle("Installed Paper Server ${build.version} build ${build.build}")
|
||||
} else {
|
||||
|
@ -5,7 +5,7 @@ import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import java.security.MessageDigest
|
||||
|
||||
class SmartDownload(val localFilePath: Path, val remoteDownloadUrl: URI, val sha256: String) {
|
||||
class SmartDownloader(val localFilePath: Path, val remoteDownloadUrl: URI, val sha256: String) {
|
||||
fun download(): Boolean {
|
||||
if (!checkLocalFileHash()) {
|
||||
downloadRemoteFile()
|
Reference in New Issue
Block a user