Updated Gradle configuration for Spigot 1.17 and added support for using the so-called "Mojang Mappings" via the use of a third-party plugin (https://www.spigotmc.org/threads/1-17-mappings-with-gradle.511184/).

This commit is contained in:
David Berdik 2021-06-29 19:30:41 -04:00
parent 82b71fda34
commit 6b63067ead
2 changed files with 24 additions and 14 deletions

View File

@ -1,23 +1,15 @@
plugins {
id 'java-library'
id 'com.github.yannicklamprecht.spigot.tools' version '1.0.1'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
}
repositories {
mavenCentral() // This is needed for dependencies.
/*
As Spigot-API depends on the Bungeecord ChatComponent-API,
we need to add the Sonatype OSS repository, as Gradle,
in comparison to maven, doesn't want to understand the ~/.m2
directory unless added using mavenLocal(). Maven usually just gets
it from there, as most people have run the BuildTools at least once.
This is therefore not needed if you're using the full Spigot/CraftBukkit,
or if you're using the Bukkit API.
*/
mavenCentral()
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
mavenLocal() // This is needed for CraftBukkit and Spigot.
@ -29,7 +21,7 @@ repositories {
}
dependencies {
compileOnly 'org.spigotmc:spigot:1.16.5-R0.1-SNAPSHOT' // The full Spigot server with no shadowing. Requires mavenLocal.
compileOnly 'org.spigotmc:spigot:1.17-R0.1-SNAPSHOT:remapped-mojang'
implementation name: 'Factions'
implementation name: 'GriefPrevention'
implementation name: 'MassiveCore'
@ -39,4 +31,12 @@ dependencies {
implementation name: 'Towny'
implementation name: 'WorldEdit'
implementation name: 'WorldGuard'
}
tasks {
spigotTools {
mojangMapped.set(true)
version.set("1.17")
outputClassifier.set("spigot-mapped")
}
}

View File

@ -7,4 +7,14 @@
* in the user manual at https://docs.gradle.org/6.7/userguide/multi_project_builds.html
*/
rootProject.name = 'Herobrine 2'
pluginManagement {
repositories {
maven {
name = "eldonexus"
url = "https://eldonexus.de/repository/maven-releases/"
}
gradlePluginPortal()
}
}
rootProject.name = 'Herobrine 2'