Update gradle to 8.14.2, add gradle auto formatting
This commit is contained in:
1 parent
a73ee14f03
commit
2f530b7c4d
3 files changed
+39
-57
No files matched your search
@@ -13,6 +13,11 @@ out/
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Eclipse
|
||||
.classpath
|
||||
.project
|
||||
.settings/
|
||||
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
|
||||
+29
-50
@@ -1,19 +1,16 @@
|
||||
import java.io.BufferedReader
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "2.1.21"
|
||||
id("com.gradleup.shadow") version "8.3.6"
|
||||
id("com.diffplug.spotless") version "7.0.4"
|
||||
kotlin("jvm") version "2.1.21" // Import kotlin jvm plugin for kotlin/java integration.
|
||||
id("com.diffplug.spotless") version "7.0.4" // Import auto-formatter.
|
||||
id("com.gradleup.shadow") version "8.3.6" // Import shadow API.
|
||||
eclipse // Import eclipse plugin for IDE integration.
|
||||
}
|
||||
|
||||
val commitHash = Runtime
|
||||
.getRuntime()
|
||||
.exec(arrayOf("git", "rev-parse", "--short=10", "HEAD"))
|
||||
.let { process ->
|
||||
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)
|
||||
}
|
||||
val output = process.inputStream.use { it.bufferedReader().use(BufferedReader::readText) }
|
||||
process.destroy()
|
||||
output.trim()
|
||||
}
|
||||
@@ -21,52 +18,41 @@ val commitHash = Runtime
|
||||
val apiVersion = "1.19"
|
||||
|
||||
group = "net.trueog"
|
||||
|
||||
version = "$apiVersion-$commitHash"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://repo.papermc.io/repository/maven-public/") {
|
||||
name = "papermc-repo"
|
||||
}
|
||||
maven("https://oss.sonatype.org/content/groups/public/") {
|
||||
name = "sonatype"
|
||||
}
|
||||
maven("https://jitpack.io") {
|
||||
name = "jitpack"
|
||||
}
|
||||
gradlePluginPortal()
|
||||
maven { url = uri("https://repo.purpurmc.org/snapshots") }
|
||||
maven("https://repo.papermc.io/repository/maven-public/") { name = "papermc-repo" }
|
||||
maven("https://oss.sonatype.org/content/groups/public/") { name = "sonatype" }
|
||||
maven("https://jitpack.io") { name = "jitpack" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
|
||||
compileOnly("org.purpurmc.purpur:purpur-api:1.19.4-R0.1-SNAPSHOT") // Declare purpur API version to be packaged.
|
||||
compileOnly("net.luckperms:api:5.5")
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib")
|
||||
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
|
||||
implementation("io.lettuce:lettuce-core:6.7.1.RELEASE")
|
||||
|
||||
compileOnly("com.github.Realizedd.Duels:duels-api:3.5.1")
|
||||
|
||||
compileOnly(project(":libs:Utilities-OG"))
|
||||
compileOnly(project(":libs:DiamondBank-OG"))
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
|
||||
compileOnly(project(":libs:Utilities-OG")) // Import TrueOG Network Utilities-OG API.
|
||||
compileOnly(project(":libs:DiamondBank-OG")) // Import TrueOG Network DiamondBank-OG API.
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
exclude(group = "io.projectreactor")
|
||||
}
|
||||
configurations.all { exclude(group = "io.projectreactor") }
|
||||
|
||||
val targetJavaVersion = 17
|
||||
kotlin {
|
||||
jvmToolchain(targetJavaVersion)
|
||||
}
|
||||
|
||||
kotlin { jvmToolchain(targetJavaVersion) }
|
||||
|
||||
tasks.build {
|
||||
dependsOn(tasks.spotlessApply)
|
||||
dependsOn(tasks.shadowJar)
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
archiveClassifier.set("part")
|
||||
}
|
||||
tasks.jar { archiveClassifier.set("part") }
|
||||
|
||||
tasks.shadowJar {
|
||||
archiveClassifier.set("")
|
||||
@@ -74,19 +60,12 @@ tasks.shadowJar {
|
||||
}
|
||||
|
||||
tasks.processResources {
|
||||
val props = mapOf(
|
||||
"version" to version,
|
||||
"apiVersion" to apiVersion
|
||||
)
|
||||
val props = mapOf("version" to version, "apiVersion" to apiVersion)
|
||||
inputs.properties(props)
|
||||
filteringCharset = "UTF-8"
|
||||
filesMatching("plugin.yml") {
|
||||
expand(props)
|
||||
}
|
||||
filesMatching("plugin.yml") { expand(props) }
|
||||
|
||||
from("LICENSE") {
|
||||
into("/")
|
||||
}
|
||||
from("LICENSE") { into("/") }
|
||||
}
|
||||
|
||||
tasks.withType<AbstractArchiveTask>().configureEach {
|
||||
@@ -102,9 +81,9 @@ java {
|
||||
}
|
||||
|
||||
spotless {
|
||||
kotlin {
|
||||
ktfmt().kotlinlangStyle().configure {
|
||||
it.setMaxWidth(120)
|
||||
}
|
||||
kotlin { ktfmt().kotlinlangStyle().configure { it.setMaxWidth(120) } }
|
||||
kotlinGradle {
|
||||
ktfmt().kotlinlangStyle().configure { it.setMaxWidth(120) }
|
||||
target("build.gradle.kts", "settings.gradle.kts")
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
-7
@@ -1,17 +1,15 @@
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
|
||||
}
|
||||
plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" }
|
||||
|
||||
rootProject.name = "Quests-OG"
|
||||
|
||||
val process: Process = ProcessBuilder("sh", "bootstrap.sh")
|
||||
.directory(rootDir)
|
||||
.start()
|
||||
val process: Process = ProcessBuilder("sh", "bootstrap.sh").directory(rootDir).start()
|
||||
|
||||
val exitValue = process.waitFor()
|
||||
|
||||
if (exitValue != 0) {
|
||||
throw GradleException("bootstrap.sh failed with exit code $exitValue")
|
||||
}
|
||||
|
||||
include("libs:Utilities-OG")
|
||||
include("libs:DiamondBank-OG")
|
||||
|
||||
include("libs:DiamondBank-OG")
|
||||
Reference in new issue
Block a user