Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
AltronMaxX committed Feb 15, 2024
1 parent ed90948 commit 4d43429
Showing 1 changed file with 3 additions and 36 deletions.
39 changes: 3 additions & 36 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
id("io.papermc.paperweight.patcher") version "1.5.11"
id("io.papermc.paperweight.patcher") version "1.5.12-SNAPSHOT"
}

val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
Expand All @@ -18,7 +18,7 @@ repositories {
}

dependencies {
remapper("net.fabricmc:tiny-remapper:0.8.11:fat")
remapper("net.fabricmc:tiny-remapper:0.10.1:fat")
decompiler("org.vineflower:vineflower:1.9.3")
paperclip("io.papermc:paperclip:3.0.4-SNAPSHOT")
}
Expand Down Expand Up @@ -95,37 +95,4 @@ paperweight {
outputDir = layout.projectDirectory.dir("paper-api-generator/generated")
}
}
}

tasks.register("foliaRefLatest") {
// Update the foliaRef in gradle.properties to be the latest commit.
val tempDir = layout.cacheDir("foliaRefLatest");
val file = "gradle.properties";

doFirst {
data class GithubCommit(
val sha: String
)

val foliaLatestCommitJson = layout.cache.resolve("foliaLatestCommit.json");
download.get().download("https://api.github.com/repos/PaperMC/Folia/commits/dev/1.20.4", foliaLatestCommitJson);
val foliaLatestCommit = gson.fromJson<paper.libs.com.google.gson.JsonObject>(foliaLatestCommitJson)["sha"].asString;

copy {
from(file)
into(tempDir)
filter { line: String ->
line.replace("foliaRef=.*".toRegex(), "foliaRef=$foliaLatestCommit")
}
}
}

doLast {
copy {
from(tempDir.file("gradle.properties"))
into(project.file(file).parent)
}
}
}


}

0 comments on commit 4d43429

Please sign in to comment.