67 lines
2.1 KiB
Groovy
67 lines
2.1 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'com.github.yannicklamprecht.spigot.tools' version '1.0.1'
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_16
|
|
targetCompatibility = JavaVersion.VERSION_16
|
|
}
|
|
|
|
repositories {
|
|
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.
|
|
|
|
// libs folder (TODO: transfer away from this!)
|
|
flatDir {
|
|
dirs 'libs'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly 'org.spigotmc:spigot:1.17-R0.1-SNAPSHOT:remapped-mojang'
|
|
implementation name: 'Factions'
|
|
implementation name: 'GriefPrevention'
|
|
implementation name: 'MassiveCore'
|
|
implementation name: 'PreciousStones'
|
|
implementation name: 'RedProtect'
|
|
implementation name: 'Residence'
|
|
implementation name: 'Towny'
|
|
implementation name: 'WorldEdit'
|
|
implementation name: 'WorldGuard'
|
|
}
|
|
|
|
tasks {
|
|
spigotTools {
|
|
mojangMapped.set(true)
|
|
version.set("1.17")
|
|
outputClassifier.set("spigot-mapped")
|
|
}
|
|
}
|
|
|
|
task genReleaseJar {
|
|
group = 'spigottools'
|
|
description = 'Generates a Spigot-mapped version of the jar for use with Spigot.'
|
|
ext.toolingDir = System.getProperty("user.dir")
|
|
ext.homeDir = project.gradle.gradleUserHomeDir.parent
|
|
|
|
doLast {
|
|
exec {
|
|
workingDir "${buildDir}"
|
|
commandLine 'java', '-jar', ext.toolingDir + '/tooling/specialsource/SpecialSource.jar', '-i', 'libs/' + rootProject.name + '.jar',
|
|
'-o', 'libs/' + rootProject.name + '-obf.jar', '-m',
|
|
ext.homeDir + '/.m2/repository/org/spigotmc/minecraft-server/1.17-R0.1-SNAPSHOT/minecraft-server-1.17-R0.1-SNAPSHOT-maps-mojang.txt',
|
|
'--reverse', '--live'
|
|
}
|
|
|
|
exec {
|
|
workingDir "${buildDir}"
|
|
commandLine 'java', '-jar', ext.toolingDir + '/tooling/specialsource/SpecialSource.jar', '-i', 'libs/' + rootProject.name + '-obf.jar',
|
|
'-o', 'libs/' + rootProject.name + '-final.jar', '-m',
|
|
ext.homeDir + '/.m2/repository/org/spigotmc/minecraft-server/1.17-R0.1-SNAPSHOT/minecraft-server-1.17-R0.1-SNAPSHOT-maps-spigot.csrg',
|
|
'--live'
|
|
}
|
|
}
|
|
} |