2023-03-18 16:02:31 +01:00
|
|
|
plugins {
|
|
|
|
java
|
|
|
|
`java-library`
|
|
|
|
`maven-publish`
|
2023-12-07 15:38:13 +01:00
|
|
|
kotlin("jvm") version "1.9.20"
|
2024-05-06 17:23:32 +02:00
|
|
|
id("io.github.goooler.shadow") version "8.1.7"
|
2023-03-29 14:37:33 +02:00
|
|
|
id("com.willfp.libreforge-gradle-plugin") version "1.0.0"
|
2023-03-18 16:02:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "com.willfp"
|
|
|
|
version = findProperty("version")!!
|
|
|
|
val libreforgeVersion = findProperty("libreforge-version")
|
|
|
|
|
|
|
|
base {
|
|
|
|
archivesName.set(project.name)
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-12-07 20:50:31 +01:00
|
|
|
implementation(project(":eco-core:core-plugin"))
|
|
|
|
implementation(project(":eco-core:core-nms:v1_17_R1"))
|
|
|
|
implementation(project(":eco-core:core-nms:v1_18_R1"))
|
|
|
|
implementation(project(":eco-core:core-nms:v1_18_R2"))
|
|
|
|
implementation(project(":eco-core:core-nms:v1_19_R1"))
|
|
|
|
implementation(project(":eco-core:core-nms:v1_19_R2"))
|
|
|
|
implementation(project(":eco-core:core-nms:v1_19_R3"))
|
|
|
|
implementation(project(":eco-core:core-nms:v1_20_R1"))
|
|
|
|
implementation(project(":eco-core:core-nms:v1_20_R2"))
|
|
|
|
implementation(project(":eco-core:core-nms:v1_20_R3", configuration = "reobf"))
|
2024-06-20 20:14:26 +02:00
|
|
|
implementation(project(":eco-core:core-nms:v1_21", configuration = "reobf"))
|
2023-03-18 16:02:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
apply(plugin = "java")
|
|
|
|
apply(plugin = "kotlin")
|
|
|
|
apply(plugin = "maven-publish")
|
2024-05-06 17:23:32 +02:00
|
|
|
apply(plugin = "io.github.goooler.shadow")
|
2023-03-18 16:02:31 +01:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
|
|
|
|
|
|
|
maven("https://repo.papermc.io/repository/maven-public/")
|
2023-03-29 14:37:33 +02:00
|
|
|
maven("https://repo.auxilor.io/repository/maven-public/")
|
2023-03-18 16:02:31 +01:00
|
|
|
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
|
|
|
maven("https://repo.codemc.org/repository/nms/")
|
|
|
|
maven("https://repo.essentialsx.net/releases/")
|
2024-06-20 20:14:26 +02:00
|
|
|
|
|
|
|
maven("https://jitpack.io") {
|
|
|
|
content { includeGroupByRegex("com\\.github\\..*") }
|
|
|
|
}
|
2023-03-18 16:02:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-06-20 20:14:26 +02:00
|
|
|
compileOnly("com.willfp:eco:6.71.0")
|
2023-03-18 16:02:31 +01:00
|
|
|
compileOnly("org.jetbrains:annotations:23.0.0")
|
2023-12-07 15:38:13 +01:00
|
|
|
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.9.20")
|
|
|
|
compileOnly("com.github.ben-manes.caffeine:caffeine:3.1.5")
|
2023-03-18 16:02:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
shadowJar {
|
|
|
|
relocate("com.willfp.libreforge.loader", "com.willfp.ecoenchants.libreforge.loader")
|
|
|
|
}
|
|
|
|
|
|
|
|
compileKotlin {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "17"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compileJava {
|
|
|
|
options.isDeprecation = true
|
|
|
|
options.encoding = "UTF-8"
|
|
|
|
|
|
|
|
dependsOn(clean)
|
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
filesMatching(listOf("**plugin.yml", "**eco.yml")) {
|
|
|
|
expand(
|
|
|
|
"version" to project.version,
|
|
|
|
"libreforgeVersion" to libreforgeVersion,
|
|
|
|
"pluginName" to rootProject.name
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
build {
|
|
|
|
dependsOn(shadowJar)
|
|
|
|
}
|
2024-06-20 20:14:26 +02:00
|
|
|
|
|
|
|
withType<JavaCompile>().configureEach {
|
|
|
|
options.release = 17
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
toolchain {
|
|
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
|
|
}
|
2023-03-18 16:02:31 +01:00
|
|
|
}
|
|
|
|
}
|
2024-05-06 17:23:32 +02:00
|
|
|
|
|
|
|
// Root is Java 21 to support 1.20.6+, rest use Java 17
|
|
|
|
java {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
|
|
withSourcesJar()
|
|
|
|
}
|