Files
Carbon/CarbonChat-Bukkit/build.gradle
T
Draycia 6c9810ea72 Add channel settings
Still need to enable automatic usage of defaults for fallbacks.
2020-09-25 01:45:36 -07:00

102 lines
2.7 KiB
Groovy

plugins {
id 'com.github.johnrengelman.shadow' version '6.0.0'
id 'net.minecrell.plugin-yml.bukkit' version '0.3.0'
}
description = 'CarbonChat-Bukkit'
dependencies {
compile 'org.spongepowered:configurate-hocon:4.0.0-SNAPSHOT'
compile project(":CarbonChat-Common")
// Messaging
compile 'io.github.leonardosnt:bungeechannelapi:1.0.0-SNAPSHOT'
// Commands
compile "com.intellectualsites:cloud-paper:1.0-SNAPSHOT"
// Plugins
compileOnly('com.gmail.nossr50.mcMMO:mcMMO:2.1.143') {
exclude group: 'org.jetbrains', module: 'annotations'
}
compileOnly 'com.github.TownyAdvanced:Towny:0.96.2.0'
compileOnly('com.sk89q.worldguard:worldguard-bukkit:7.0.4-SNAPSHOT') {
exclude group: 'org.spigotmc', module: 'spigot-api' // Honestly?
}
compileOnly 'me.clip:placeholderapi:2.10.9'
compileOnly 'com.github.TownyAdvanced:Towny:0.96.1.11'
compileOnly 'com.vexsoftware:nuvotifier-universal:2.6.0'
compileOnly 'net.luckperms:api:5.1'
compileOnly 'com.github.MilkBowl:VaultAPI:1.7' // TODO: remove
// Server
compileOnly 'com.destroystokyo.paper:paper-api:1.16.2-R0.1-SNAPSHOT'
}
// Generates plugin.yml automatically
bukkit {
name = project.description
version = project.version
main = 'net.draycia.carbon.CarbonChatBukkit'
apiVersion = '1.13'
author = 'Draycia'
depend = ['PlaceholderAPI', 'Vault']
softDepend = ['LuckPerms', 'Towny', 'mcMMO', 'WorldGuard']
loadBefore = ["Essentials"]
permissions {
'carbonchat.channels.global.see' {
setDefault("TRUE")
}
'carbonchat.channels.global.use' {
setDefault("TRUE")
}
}
}
checkstyle {
def configRoot = new File(rootProject.projectDir, '.checkstyle')
toolVersion = '8.34'
configDirectory = configRoot
configProperties = [basedir: configRoot.getAbsolutePath()]
}
sourceCompatibility = '1.8'
// Set output directory and encoding
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs += ['-Xlint:all']
}
// Automatically shadowJar when building
tasks.build.dependsOn tasks.shadowJar
// Output a single jar
shadowJar {
minimize()
archiveFileName.set(project.description + "-" + project.property('projectVersion') + ".jar")
destinationDirectory = rootProject.getBuildDir()
}
jar {
archiveFileName.set(project.description + "-" + project.property('projectVersion') + ".jar")
}
//// Automatically relocate all shaded dependencies
//import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
//
//task relocateShadowJar(type: ConfigureShadowRelocation) {
// target = tasks.shadowJar
// prefix = "net.draycia.carbon.libs" // Default value is "shadow"
//}
//
//tasks.shadowJar.dependsOn tasks.relocateShadowJar
// Cleanup custom output directory on clean task
clean.doFirst {
delete "$rootDir/build/bundled"
}