mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2024-12-28 10:24:15 +00:00
103 lines
3.1 KiB
Groovy
103 lines
3.1 KiB
Groovy
import org.apache.tools.ant.filters.ReplaceTokens
|
|
|
|
plugins {
|
|
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
|
id 'maven-publish'
|
|
id 'java-library'
|
|
}
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
compileJava.options.encoding = 'UTF-8'
|
|
group = 'dev.esophose'
|
|
version = '7.23'
|
|
|
|
java {
|
|
withJavadocJar()
|
|
withSourcesJar()
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
|
|
maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
|
|
maven { url = 'https://repo.codemc.org/repository/maven-public' }
|
|
maven { url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
|
|
maven { url = 'https://repo.rosewooddev.io/repository/public/' }
|
|
}
|
|
|
|
dependencies {
|
|
api 'org.slf4j:slf4j-api:1.7.25'
|
|
api 'org.slf4j:slf4j-nop:1.7.25'
|
|
api 'com.zaxxer:HikariCP:3.2.0'
|
|
api 'org.bstats:bstats-bukkit-lite:1.7'
|
|
api 'org.codemc.worldguardwrapper:worldguardwrapper:1.2.0-SNAPSHOT'
|
|
compileOnly 'org.jetbrains:annotations:16.0.2'
|
|
compileOnly 'me.clip:placeholderapi:2.10.4'
|
|
compileOnly 'org.xerial:sqlite-jdbc:3.23.1'
|
|
compileOnly 'org.spigotmc:spigot-api:1.18.1-R0.1-SNAPSHOT'
|
|
}
|
|
|
|
shadowJar {
|
|
archiveClassifier.set(null)
|
|
minimize()
|
|
|
|
relocate('org.bstats', 'dev.esophose.playerparticles.libs.bstats')
|
|
relocate('org.slf4j', 'dev.esophose.playerparticles.libs.slf4j')
|
|
relocate('com.zaxxer.hikari', 'dev.esophose.playerparticles.libs.hikaricp')
|
|
relocate('org.codemc.worldguardwrapper', 'dev.esophose.playerparticles.libs.worldguardwrapper')
|
|
}
|
|
|
|
processResources {
|
|
from (sourceSets.main.resources.srcDirs) {
|
|
include '**/*.yml'
|
|
filter ReplaceTokens, tokens: ["version": project.property("version")]
|
|
duplicatesStrategy DuplicatesStrategy.INCLUDE
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
shadow(MavenPublication) { publication ->
|
|
project.shadow.component(publication)
|
|
}
|
|
mavenJava(MavenPublication) {
|
|
artifactId = 'playerparticles'
|
|
from components.java
|
|
versionMapping {
|
|
usage('java-api') {
|
|
fromResolutionOf('runtimeClasspath')
|
|
}
|
|
usage('java-runtime') {
|
|
fromResolutionResult()
|
|
}
|
|
}
|
|
pom {
|
|
name = 'playerparticles'
|
|
}
|
|
}
|
|
}
|
|
repositories {
|
|
if (project.hasProperty('mavenUsername') && project.hasProperty('mavenPassword')) {
|
|
maven {
|
|
credentials {
|
|
username project.mavenUsername
|
|
password project.mavenPassword
|
|
}
|
|
|
|
def releasesRepoUrl = 'https://repo.codemc.org/repository/maven-releases/'
|
|
def snapshotsRepoUrl = 'https://repo.codemc.org/repository/maven-snapshots/'
|
|
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
javadoc {
|
|
options.encoding = 'UTF-8'
|
|
if (JavaVersion.current().isJava9Compatible()) {
|
|
options.addBooleanOption('html5', true)
|
|
}
|
|
}
|
|
|
|
build.dependsOn shadowJar
|