aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-05-31 06:19:52 +0200
committerGitHub <noreply@github.com>2024-05-31 14:19:52 +1000
commit9b69eb0d5cb268abbd52350d1e4aabb067f2e010 (patch)
tree02cab3fa34257b5bb92529bbf120bd6bb7cb2552 /build.gradle.kts
parent202fa439931f4171f2f53995e63f82da6876e596 (diff)
downloadNotEnoughUpdates-9b69eb0d5cb268abbd52350d1e4aabb067f2e010.tar.gz
NotEnoughUpdates-9b69eb0d5cb268abbd52350d1e4aabb067f2e010.tar.bz2
NotEnoughUpdates-9b69eb0d5cb268abbd52350d1e4aabb067f2e010.zip
meta: Fix include backup repo task (#1190)
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts23
1 files changed, 6 insertions, 17 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 64c1a884..ef9ee714 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -18,10 +18,7 @@
*/
-import neubs.CustomSignTask
-import neubs.NEUBuildFlags
-import neubs.applyPublishingInformation
-import neubs.setVersionFromEnvironment
+import neubs.*
import org.apache.commons.lang3.SystemUtils
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import java.net.URL
@@ -259,18 +256,9 @@ val mixinDependencyCollectionJar by tasks.creating(Zip::class) {
into("neu-mixin-libraries-wrapped")
}
-tasks.register("includeBackupRepo") {
- doLast {
- val url = URL("https://github.com/NotEnoughUpdates/NotEnoughUpdates-REPO/archive/refs/heads/prerelease.zip")
- val destinationFolder = project.buildDir.resolve("classes/java/main/assets/notenoughupdates/")
- destinationFolder.mkdirs()
- val destination = destinationFolder.resolve("repo.zip")
- destination.createNewFile()
-
- destination.outputStream().use {
- url.openStream().copyTo(it)
- }
- }
+val includeBackupRepo by tasks.registering(DownloadBackupRepo::class) {
+ this.branch.set("master")
+ this.outputDirectory.set(layout.buildDirectory.dir("downloadedRepo"))
}
@@ -302,6 +290,7 @@ tasks.assemble.get().dependsOn(remapJar)
tasks.processResources {
from(tasks["generateBuildFlags"])
+ from(includeBackupRepo)
filesMatching(listOf("mcmod.info", "fabric.mod.json", "META-INF/mods.toml")) {
expand(
"version" to project.version, "mcversion" to "1.8.9"
@@ -348,4 +337,4 @@ applyPublishingInformation(
"deobf" to tasks.jar,
"all" to tasks.remapJar,
"sources" to tasks["sourcesJar"],
-) \ No newline at end of file
+)