Merge pull request #1 from NotAlexNoyle/main
Update gradle
This commit was merged in pull request #1.
This commit is contained in:
3 files changed
+36
-23
No files matched your search
+30
-21
@@ -1,24 +1,26 @@
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.BufferedReader
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "2.1.21"
|
||||
id("com.gradleup.shadow") version "8.3.5"
|
||||
id("xyz.jpenilla.run-paper") version "2.3.1"
|
||||
}
|
||||
|
||||
fun getGitCommitHash(): String {
|
||||
val stdout = ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine("git", "rev-parse", "--short=10", "HEAD")
|
||||
standardOutput = stdout
|
||||
val commitHash = Runtime
|
||||
.getRuntime()
|
||||
.exec(arrayOf("git", "rev-parse", "--short=10", "HEAD"))
|
||||
.let { process ->
|
||||
process.waitFor()
|
||||
val output = process.inputStream.use {
|
||||
it.bufferedReader().use(BufferedReader::readText)
|
||||
}
|
||||
process.destroy()
|
||||
output.trim()
|
||||
}
|
||||
return stdout.toString().trim()
|
||||
}
|
||||
|
||||
val apiVersion = "1.19"
|
||||
|
||||
group = "net.trueog"
|
||||
version = "$apiVersion-${getGitCommitHash()}"
|
||||
version = "$apiVersion-$commitHash"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@@ -28,8 +30,8 @@ repositories {
|
||||
maven("https://oss.sonatype.org/content/groups/public/") {
|
||||
name = "sonatype"
|
||||
}
|
||||
maven {
|
||||
url = uri("https://jitpack.io")
|
||||
maven("https://jitpack.io") {
|
||||
name = "jitpack"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,15 +49,6 @@ dependencies {
|
||||
compileOnly(project(":libs:DiamondBank-OG"))
|
||||
}
|
||||
|
||||
tasks {
|
||||
runServer {
|
||||
// Configure the Minecraft version for our task.
|
||||
// This is the only required configuration besides applying the plugin.
|
||||
// Your plugin's jar (or shadowJar if present) will be used automatically.
|
||||
minecraftVersion("1.19")
|
||||
}
|
||||
}
|
||||
|
||||
val targetJavaVersion = 17
|
||||
kotlin {
|
||||
jvmToolchain(targetJavaVersion)
|
||||
@@ -84,4 +77,20 @@ tasks.processResources {
|
||||
filesMatching("plugin.yml") {
|
||||
expand(props)
|
||||
}
|
||||
|
||||
from("LICENSE") {
|
||||
into("/")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<AbstractArchiveTask>().configureEach {
|
||||
isPreserveFileTimestamps = false
|
||||
isReproducibleFileOrder = true
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
||||
vendor = JvmVendorSpec.GRAAL_VM
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+5
-1
@@ -1,6 +1,10 @@
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
|
||||
}
|
||||
|
||||
rootProject.name = "Quests-OG"
|
||||
|
||||
val process = ProcessBuilder("sh", "bootstrap.sh")
|
||||
val process: Process = ProcessBuilder("sh", "bootstrap.sh")
|
||||
.directory(rootDir)
|
||||
.start()
|
||||
|
||||
|
||||
Reference in new issue
Block a user