From 258431317906ddb1c5e6567c7d18e318ad994e9d Mon Sep 17 00:00:00 2001 From: Tianpao Date: Tue, 6 Aug 2024 16:11:33 +0000 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E8=A3=81=E5=82=BB=E5=AD=90Arclight?= =?UTF-8?q?=E7=9A=84=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 build.gradle diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..652d8adc --- /dev/null +++ b/build.gradle @@ -0,0 +1,48 @@ +import io.izzel.arclight.gradle.tasks.UploadFilesTask + +allprojects { + group 'io.izzel.arclight' + version '1.0.6-SNAPSHOT' + + def getGitHash = { -> + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git', 'rev-parse', '--short', 'HEAD' + standardOutput = stdout + } + return stdout.toString().trim() + } + + ext { + agpVersion = '1.23' + minecraftVersion = '1.20.1' + forgeVersion = '47.3.5' + apiVersion = '1.5.4' + toolsVersion = '1.3.0' + mixinVersion = '0.8.5' + versionName = 'trials' + gitHash = getGitHash() + } + + task cleanBuild { + doFirst { + project.file("build/libs").deleteDir() + } + } +} + +task collect(type: Copy) { + destinationDir = file('build/libs') + from { project(':arclight-forge').tasks.jar.outputs } + dependsOn { project(':arclight-forge').tasks.jar } +} + +def gitBranch() { + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git', 'rev-parse', '--abbrev-ref', 'HEAD' + standardOutput = stdout + } + return stdout.toString().trim() +} +