PickShadow/extension/build.gradle

105 lines
3.3 KiB
Groovy
Raw Normal View History

2024-10-08 03:15:46 +02:00
/*
* PICKSHADOW SERVER KIT SOURCE FILE
* Copyright (c) 2024 The PickShadow Server Kit authors
* Licensed under the GNU Affero General Public License v3
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
2024-11-14 20:07:26 +01:00
import io.papermc.paperweight.userdev.ReobfArtifactConfiguration
2024-10-08 03:15:46 +02:00
// Plugins
plugins {
id("java")
id("io.freefair.lombok") version("${pluginLombok}")
id("io.papermc.paperweight.userdev") version("${pluginPaperweight}")
id("io.github.goooler.shadow") version("${pluginShadow}")
id("xyz.jpenilla.run-paper") version("${pluginRunTask}")
}
// Dependencies
dependencies {
// Lombok
compileOnly("org.projectlombok:lombok:${dependencyLombok}")
annotationProcessor("org.projectlombok:lombok:${dependencyLombok}")
// JetBrains Annotations
compileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}")
// Libraries
2024-11-14 20:07:26 +01:00
compileOnly("de.staropensource.engine:base:${dependencyStarOpenSourceEngine}")
runtimeOnly("de.staropensource.enginemc:platform-bukkit:${dependencyStarOpenSourceEngineMC}")
2024-10-08 03:15:46 +02:00
implementation("com.google.code.gson:gson:${dependencyGson}")
// Server
compileOnly("io.papermc.paper:paper-api:${minecraftVersion}-${dependencyPaper}-SNAPSHOT")
compileOnly("net.kyori:adventure-api:${dependencyAdventure}")
paperweight.paperDevBundle("${minecraftVersion}-${dependencyPaper}-SNAPSHOT")
// Plugins
compileOnly("net.luckperms:api:${dependencyLuckPerms}")
2024-10-09 02:33:06 +02:00
// Bukkit libraries
implementation("fr.mrmicky:fastboard:${dependencyFastboard}")
2024-11-14 20:07:26 +01:00
// Project
implementation(project(":common"))
2024-10-08 03:15:46 +02:00
}
// Set Java version
java {
toolchain.languageVersion.set(JavaLanguageVersion.of("${javaTarget}"))
}
// Update plugin.yml
processResources {
filesMatching("plugin.yml") {
expand project.properties
}
}
// Configure paperweight
paperweight {
reobfArtifactConfiguration = ReobfArtifactConfiguration.getMOJANG_PRODUCTION()
}
// Configure server
runServer {
minecraftVersion("${minecraftVersion}")
2024-11-14 20:07:26 +01:00
jvmArguments.addAll(
"-Dfile.encoding=UTF-8",
"-Dcom.mojang.eula.agree=true",
"-Dsosengine.base.logLevel=diagnostic",
"-Dpickshadow.extension.enabledModes=general,survival,survivalcheat"
)
2024-10-08 03:15:46 +02:00
downloadPlugins {
url("${downloadEngineMC}")
url("${downloadLuckPerms}")
2024-11-14 20:07:26 +01:00
url("${downloadSpark}")
modrinth("freedomchat", "${downloadFreedomChat}")
2024-10-08 03:15:46 +02:00
}
doFirst {
// Disable bStats
File config = new File(runDirectory.get().getAsFile().getPath() + "/plugins/bStats/config.yml")
if (!config.exists()) {
config.getParentFile().mkdirs()
config.createNewFile()
config.write("enabled: false\n")
}
}
}