GriefDefender/sponge/build.gradle

230 lines
7.1 KiB
Groovy
Raw Normal View History

2019-11-24 23:01:05 +01:00
buildscript {
repositories {
maven {
name = 'forge'
url = 'http://files.minecraftforge.net/maven'
}
maven {
url = 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '5.1.0'
id 'org.spongepowered.plugin' version '0.8.1'
id 'net.minecrell.vanillagradle.server' version '2.2-4'
id 'java'
}
compileJava.options.encoding = 'UTF-8'
2019-12-28 23:26:37 +01:00
group = 'com.griefdefender'
sponge {
plugin {
id = "griefdefender"
meta {
name = "GriefDefender"
version = "$version"
description = "Designed to defend servers from all forms of grief."
2019-12-28 23:26:37 +01:00
url = "$url"
authors = ["bloodmc"]
}
}
}
2019-11-24 23:01:05 +01:00
// Environment variables for the build set by the build server
ext.buildNumber = System.env.BUILD_NUMBER ?: '0'
defaultTasks 'clean', 'build'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
2019-12-28 23:26:37 +01:00
archivesBaseName = 'griefdefender'
2019-11-24 23:01:05 +01:00
project.ext.getGitHash = {
def command = Runtime.getRuntime().exec("git rev-parse --short HEAD")
def result = command.waitFor()
return (result == 0) ? command.inputStream.text.trim() : "nogit"
}
repositories {
mavenLocal()
maven {
name = 'sk89q'
url = 'https://maven.sk89q.com/repo'
}
maven {
name = 'bstats'
url = 'https://repo.codemc.org/repository/maven-public'
}
2020-01-06 01:11:25 +01:00
maven {
name = 'dynmap-repo'
url = 'http://repo.mikeprimm.com'
}
2019-11-24 23:01:05 +01:00
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven/'
}
maven {
name = 'nucleus'
url = 'http://repo.drnaylor.co.uk/artifactory/list/minecraft'
}
maven {
name = 'sonatype_releases'
url = 'https://oss.sonatype.org/content/repositories/releases'
}
maven {
name = 'sonatype_snapshots'
url = 'https://oss.sonatype.org/content/repositories/snapshots'
}
maven {
name = 'glare'
url = 'https://repo.glaremasters.me/repository/bloodshot'
}
maven {
name = 'aikar'
url = 'https://repo.aikar.co/content/groups/aikar'
}
maven {
name = 'worldedit'
url = 'http://maven.sk89q.com/artifactory/repo'
}
maven {
name = 'jitpack'
url = 'https://jitpack.io'
}
}
minecraft {
version = project.minecraftVersion
mappings = project.mcpMappings
}
sourceSets {
api
}
dependencies {
2019-12-19 23:43:16 +01:00
compileOnly(project(path: ":GriefDefenderAPI"))
Update for 1.5.10 release. * Fix ClaimBlockTask prematurely exiting if a player had max claim blocks. * Fix TaxApplyTask not pulling funds from claim bank first. * Fix ClaimContextCalculator overwriting option claim contexts. * Fix player option commands running during a command causing a loop. * Fix player-command-enter running command from subclaim. * Fix player-command-exit running command to subclaim. * Fix player contexts not being added in all cases where a player is involved. * Fix flag definitions not accepting any context. * Fix elytra enter-claim bypass. * Add 'claim-create-radius-limit' to global config. * Add Simplified Chinese language support (zh_CN). * Add enter-claim flag permission check on player login. * Add enter/exit-claim support for player respawns. If denied, GD will respawn player back in source claim in a safe location. * Add TE NBT id support for mods such as gregtech. * (Hybrid) Fix mohist EntityType mod registration. * (Hybrid/Sponge) Add TE NBT id support for mods such as gregtech. See new setting 'tile-id-nbt-map' under mod category in global.conf * (Sponge) Add 'interact-item-force-list' to global config. Used to force interact-item flag checks when a player left/right-clicks with an item in hand. * (Sponge) Add check to prevent re-registration of worlds. * (Sponge) Add workaround during collisions when user is wrapped in ProjectileSource. * (Sponge) Add EntityThrowable support for getEntityOwner. * (Sponge) Add method to get internal DamageSource type name. * (Sponge) Fix NPE when cancelling claim with '/claimrent cancel' * (Sponge) Fix wrong block being checked during bucket interactions such as lava and water. * (Sponge) Fix block-pre not handing certain mod permission checks such as AE2 cables. * (Sponge) Fix 'block-id-convert-list' feature not using correct id during player interactions. * (Sponge) Fix item-pickup flag not checking trust.
2021-02-06 00:06:14 +01:00
compileOnly fileTree(dir: 'libs', include: ['*.jar'])
2020-01-10 01:53:00 +01:00
compile project (':common')
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
compileOnly "com.griefdefender:adapter-sponge:$adapterSpongeVersion"
2019-11-24 23:01:05 +01:00
compileOnly "com.griefdefender:reflect-helper:1.0"
// Sponge
Update for 1.5.10 release. * Fix ClaimBlockTask prematurely exiting if a player had max claim blocks. * Fix TaxApplyTask not pulling funds from claim bank first. * Fix ClaimContextCalculator overwriting option claim contexts. * Fix player option commands running during a command causing a loop. * Fix player-command-enter running command from subclaim. * Fix player-command-exit running command to subclaim. * Fix player contexts not being added in all cases where a player is involved. * Fix flag definitions not accepting any context. * Fix elytra enter-claim bypass. * Add 'claim-create-radius-limit' to global config. * Add Simplified Chinese language support (zh_CN). * Add enter-claim flag permission check on player login. * Add enter/exit-claim support for player respawns. If denied, GD will respawn player back in source claim in a safe location. * Add TE NBT id support for mods such as gregtech. * (Hybrid) Fix mohist EntityType mod registration. * (Hybrid/Sponge) Add TE NBT id support for mods such as gregtech. See new setting 'tile-id-nbt-map' under mod category in global.conf * (Sponge) Add 'interact-item-force-list' to global config. Used to force interact-item flag checks when a player left/right-clicks with an item in hand. * (Sponge) Add check to prevent re-registration of worlds. * (Sponge) Add workaround during collisions when user is wrapped in ProjectileSource. * (Sponge) Add EntityThrowable support for getEntityOwner. * (Sponge) Add method to get internal DamageSource type name. * (Sponge) Fix NPE when cancelling claim with '/claimrent cancel' * (Sponge) Fix wrong block being checked during bucket interactions such as lava and water. * (Sponge) Fix block-pre not handing certain mod permission checks such as AE2 cables. * (Sponge) Fix 'block-id-convert-list' feature not using correct id during player interactions. * (Sponge) Fix item-pickup flag not checking trust.
2021-02-06 00:06:14 +01:00
//apiCompile "org.spongepowered:spongeapi:$apiVersion"
2019-11-24 23:01:05 +01:00
compileOnly ("org.spongepowered:spongecommon:$commonVersion:dev") {
exclude module: 'testplugins'
}
// Plugins
compileOnly ("io.github.nucleuspowered:nucleus-api:1.14.1-S7.1"){
exclude module: 'spongeapi'
}
Update for 1.5.10 release. * Fix ClaimBlockTask prematurely exiting if a player had max claim blocks. * Fix TaxApplyTask not pulling funds from claim bank first. * Fix ClaimContextCalculator overwriting option claim contexts. * Fix player option commands running during a command causing a loop. * Fix player-command-enter running command from subclaim. * Fix player-command-exit running command to subclaim. * Fix player contexts not being added in all cases where a player is involved. * Fix flag definitions not accepting any context. * Fix elytra enter-claim bypass. * Add 'claim-create-radius-limit' to global config. * Add Simplified Chinese language support (zh_CN). * Add enter-claim flag permission check on player login. * Add enter/exit-claim support for player respawns. If denied, GD will respawn player back in source claim in a safe location. * Add TE NBT id support for mods such as gregtech. * (Hybrid) Fix mohist EntityType mod registration. * (Hybrid/Sponge) Add TE NBT id support for mods such as gregtech. See new setting 'tile-id-nbt-map' under mod category in global.conf * (Sponge) Add 'interact-item-force-list' to global config. Used to force interact-item flag checks when a player left/right-clicks with an item in hand. * (Sponge) Add check to prevent re-registration of worlds. * (Sponge) Add workaround during collisions when user is wrapped in ProjectileSource. * (Sponge) Add EntityThrowable support for getEntityOwner. * (Sponge) Add method to get internal DamageSource type name. * (Sponge) Fix NPE when cancelling claim with '/claimrent cancel' * (Sponge) Fix wrong block being checked during bucket interactions such as lava and water. * (Sponge) Fix block-pre not handing certain mod permission checks such as AE2 cables. * (Sponge) Fix 'block-id-convert-list' feature not using correct id during player interactions. * (Sponge) Fix item-pickup flag not checking trust.
2021-02-06 00:06:14 +01:00
//compile "com.github.randombyte-developer:PlaceholderAPI:4.5.1"
//compile "com.github.bloodmc:mcclans-api:develop-SNAPSHOT"
2019-11-24 23:01:05 +01:00
compileOnly "com.sk89q.worldedit:worldedit-core:6.1.4-SNAPSHOT"
Update for 1.5.10 release. * Fix ClaimBlockTask prematurely exiting if a player had max claim blocks. * Fix TaxApplyTask not pulling funds from claim bank first. * Fix ClaimContextCalculator overwriting option claim contexts. * Fix player option commands running during a command causing a loop. * Fix player-command-enter running command from subclaim. * Fix player-command-exit running command to subclaim. * Fix player contexts not being added in all cases where a player is involved. * Fix flag definitions not accepting any context. * Fix elytra enter-claim bypass. * Add 'claim-create-radius-limit' to global config. * Add Simplified Chinese language support (zh_CN). * Add enter-claim flag permission check on player login. * Add enter/exit-claim support for player respawns. If denied, GD will respawn player back in source claim in a safe location. * Add TE NBT id support for mods such as gregtech. * (Hybrid) Fix mohist EntityType mod registration. * (Hybrid/Sponge) Add TE NBT id support for mods such as gregtech. See new setting 'tile-id-nbt-map' under mod category in global.conf * (Sponge) Add 'interact-item-force-list' to global config. Used to force interact-item flag checks when a player left/right-clicks with an item in hand. * (Sponge) Add check to prevent re-registration of worlds. * (Sponge) Add workaround during collisions when user is wrapped in ProjectileSource. * (Sponge) Add EntityThrowable support for getEntityOwner. * (Sponge) Add method to get internal DamageSource type name. * (Sponge) Fix NPE when cancelling claim with '/claimrent cancel' * (Sponge) Fix wrong block being checked during bucket interactions such as lava and water. * (Sponge) Fix block-pre not handing certain mod permission checks such as AE2 cables. * (Sponge) Fix 'block-id-convert-list' feature not using correct id during player interactions. * (Sponge) Fix item-pickup flag not checking trust.
2021-02-06 00:06:14 +01:00
compileOnly "com.github.lucko:luckperms:v5.2"
2020-01-06 01:11:25 +01:00
compileOnly "us.dynmap:dynmap-api:3.0-SNAPSHOT"
2019-11-24 23:01:05 +01:00
// required for bootstrap
compile "com.googlecode.json-simple:json-simple:1.1.1"
compileOnly "aopalliance:aopalliance:1.0"
compileOnly "co.aikar:acf-core:0.5.0-SNAPSHOT"
compileOnly "co.aikar:acf-sponge:0.5.0-SNAPSHOT"
compileOnly "co.aikar:locales:1.0-SNAPSHOT"
compileOnly "co.aikar:minecraft-timings:1.0.4"
compileOnly "co.aikar:Table:1.0.0-SNAPSHOT"
compileOnly "com.flowpowered:flow-math:1.0.3"
compileOnly "com.github.ben-manes.caffeine:caffeine:2.7.0"
compileOnly "com.squareup.okhttp3:okhttp:4.7.2"
compileOnly "com.squareup.okio:okio:2.6.0"
2019-11-24 23:01:05 +01:00
compileOnly "commons-io:commons-io:2.6"
compileOnly "it.unimi.dsi:fastutil:8.2.3"
compileOnly "javax.inject:javax.inject:1"
compileOnly "me.lucko:jar-relocator:1.3"
compileOnly "net.jodah:expiringmap:0.5.9"
compileOnly "org.apache.commons:commons-lang3:3.9"
compileOnly "org.checkerframework:checker:2.8.2"
compileOnly "org.jetbrains:annotations:17.0.0"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:1.3.72"
2019-11-24 23:01:05 +01:00
compileOnly "org.ow2.asm:asm-debug-all:5.2"
Update for 1.5.10 release. * Fix ClaimBlockTask prematurely exiting if a player had max claim blocks. * Fix TaxApplyTask not pulling funds from claim bank first. * Fix ClaimContextCalculator overwriting option claim contexts. * Fix player option commands running during a command causing a loop. * Fix player-command-enter running command from subclaim. * Fix player-command-exit running command to subclaim. * Fix player contexts not being added in all cases where a player is involved. * Fix flag definitions not accepting any context. * Fix elytra enter-claim bypass. * Add 'claim-create-radius-limit' to global config. * Add Simplified Chinese language support (zh_CN). * Add enter-claim flag permission check on player login. * Add enter/exit-claim support for player respawns. If denied, GD will respawn player back in source claim in a safe location. * Add TE NBT id support for mods such as gregtech. * (Hybrid) Fix mohist EntityType mod registration. * (Hybrid/Sponge) Add TE NBT id support for mods such as gregtech. See new setting 'tile-id-nbt-map' under mod category in global.conf * (Sponge) Add 'interact-item-force-list' to global config. Used to force interact-item flag checks when a player left/right-clicks with an item in hand. * (Sponge) Add check to prevent re-registration of worlds. * (Sponge) Add workaround during collisions when user is wrapped in ProjectileSource. * (Sponge) Add EntityThrowable support for getEntityOwner. * (Sponge) Add method to get internal DamageSource type name. * (Sponge) Fix NPE when cancelling claim with '/claimrent cancel' * (Sponge) Fix wrong block being checked during bucket interactions such as lava and water. * (Sponge) Fix block-pre not handing certain mod permission checks such as AE2 cables. * (Sponge) Fix 'block-id-convert-list' feature not using correct id during player interactions. * (Sponge) Fix item-pickup flag not checking trust.
2021-02-06 00:06:14 +01:00
compileOnly "org.spongepowered:configurate-core:3.7.2"
compileOnly "org.spongepowered:configurate-gson:3.7.2"
compileOnly "org.spongepowered:configurate-hocon:3.7.2"
compileOnly "org.spongepowered:configurate-yaml:3.7.2"
2019-11-24 23:01:05 +01:00
compileOnly "net.kyori:event-api:3.0.0"
compileOnly "net.kyori:event-method:3.0.0"
compileOnly "net.kyori:event-method-asm:3.0.0"
compileOnly "net.kyori:text-adapter-bukkit:3.0.3"
compileOnly "net.kyori:text-adapter-bungeecord:3.0.3"
compileOnly "net.kyori:text-adapter-spongeapi:3.0.3"
compileOnly "net.kyori:text-api:3.0.2"
compileOnly "net.kyori:text-serializer-gson:3.0.2"
compileOnly "net.kyori:text-serializer-legacy:3.0.2"
compileOnly "net.kyori:text-serializer-plain:3.0.2"
}
jar {
manifest.attributes('FMLAT': 'griefdefender_at.cfg')
manifest.attributes('Implementation-Title': 'GriefDefender')
manifest.attributes('Implementation-Version': "$version")
manifest.attributes('Git-Hash': project.ext.getGitHash())
classifier = 'SNAPSHOT'
baseName = 'griefdefender-sponge'
}
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives shadowJar
}
shadowJar {
mainSpec.sourcePaths.clear()
dependsOn reobfJar
classifier = ''
dependencies {
2020-01-10 01:53:00 +01:00
include dependency(':common')
//include dependency("com.squareup.okhttp3:okhttp:3.9.1")
//include dependency("com.squareup.okio:okio:1.13.0")
//include dependency("org.jetbrains.kotlin:kotlin-stdlib:1.3.31")
2019-11-24 23:01:05 +01:00
include dependency("com.googlecode.json-simple:json-simple:1.1.1")
}
relocate("aopalliance", "com.griefdefender.lib.aopalliance")
relocate("com.github.benmanes.caffeine", "com.griefdefender.lib.caffeine")
relocate("it.unimi.dsi", "com.griefdefender.lib.fastutil")
relocate("net.jodah", "com.griefdefender.lib.jodah")
relocate("okhttp3", "com.griefdefender.lib.okhttp3")
relocate("okio", "com.griefdefender.lib.okio")
relocate("kotlin", "com.griefdefender.lib.kotlin")
2019-11-24 23:01:05 +01:00
relocate("org.apache.commons.io", "com.griefdefender.lib.commonsio")
relocate("org.apache.commons.lang3", "com.griefdefender.lib.commonslang3")
relocate("org.checkerframework", "com.griefdefender.lib.checkerframework")
exclude "dummyThing"
afterEvaluate {
from zipTree(reobfJar.jar)
}
}