2020-07-14 18:56:49 +02:00
|
|
|
plugins {
|
2020-07-27 09:21:35 +02:00
|
|
|
id "java"
|
2020-07-28 18:58:06 +02:00
|
|
|
id "maven-publish"
|
2020-07-27 09:21:35 +02:00
|
|
|
id "net.minecrell.licenser" version "0.4.1"
|
|
|
|
id "com.github.johnrengelman.shadow" version "6.0.0"
|
2020-07-14 18:56:49 +02:00
|
|
|
}
|
|
|
|
|
2020-07-27 09:21:35 +02:00
|
|
|
group "me.clip"
|
2020-07-28 23:36:39 +02:00
|
|
|
version "2.10.7"
|
2020-07-14 18:56:49 +02:00
|
|
|
|
2020-07-27 09:21:35 +02:00
|
|
|
description "An awesome placeholder provider!"
|
2020-07-14 18:56:49 +02:00
|
|
|
|
|
|
|
repositories {
|
2020-07-24 17:48:37 +02:00
|
|
|
mavenCentral()
|
2020-07-24 20:47:30 +02:00
|
|
|
|
2020-07-27 09:21:35 +02:00
|
|
|
maven({ url = "https://rayzr.dev/repo/" })
|
|
|
|
maven({ url = "https://repo.codemc.org/repository/maven-public" })
|
|
|
|
maven({ url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" })
|
2020-07-14 18:56:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2020-07-27 09:23:32 +02:00
|
|
|
implementation "com.google.code.gson:gson:2.8.6"
|
|
|
|
implementation "org.bstats:bstats-bukkit:1.5"
|
|
|
|
implementation "me.rayzr522:jsonmessage:1.2.1"
|
2020-07-21 02:13:32 +02:00
|
|
|
|
2020-07-27 09:21:35 +02:00
|
|
|
compileOnly "org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT"
|
|
|
|
compileOnly "org.jetbrains:annotations:19.0.0"
|
2020-07-21 02:13:32 +02:00
|
|
|
|
2020-07-27 09:21:35 +02:00
|
|
|
testImplementation "org.openjdk.jmh:jmh-core:1.23"
|
|
|
|
testImplementation "org.openjdk.jmh:jmh-generator-annprocess:1.23"
|
2020-07-21 02:13:32 +02:00
|
|
|
|
|
|
|
testCompile "org.junit.jupiter:junit-jupiter-engine:5.6.2"
|
|
|
|
testRuntime "org.junit.jupiter:junit-jupiter-engine:5.6.2"
|
2020-07-14 18:56:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
2020-07-21 02:13:32 +02:00
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
2020-07-29 23:42:42 +02:00
|
|
|
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [name: rootProject.name, version: project.version.toString(), description: project.description]
|
2020-07-21 02:13:32 +02:00
|
|
|
}
|
2020-07-14 18:56:49 +02:00
|
|
|
}
|
|
|
|
|
2020-07-24 20:47:30 +02:00
|
|
|
tasks.withType(JavaCompile) {
|
2020-07-27 09:21:35 +02:00
|
|
|
options.encoding = "UTF-8"
|
2020-07-24 20:47:30 +02:00
|
|
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
}
|
2020-07-14 18:56:49 +02:00
|
|
|
|
|
|
|
shadowJar {
|
2020-07-27 09:21:35 +02:00
|
|
|
archiveClassifier.set("")
|
2020-07-24 20:47:30 +02:00
|
|
|
|
2020-07-21 02:13:32 +02:00
|
|
|
relocate "org.bstats", "me.clip.placeholderapi.metrics"
|
|
|
|
relocate "com.google.gson", "me.clip.placeholderapi.libs.gson"
|
|
|
|
relocate "me.rayzr522.jsonmessage", "me.clip.placeholderapi.libs.jsonmessage"
|
|
|
|
}
|
|
|
|
|
2020-07-27 09:21:35 +02:00
|
|
|
license {
|
|
|
|
header = file("headers/header.txt")
|
2020-07-30 00:20:39 +02:00
|
|
|
|
2020-07-27 09:21:35 +02:00
|
|
|
ext {
|
|
|
|
year = 2020
|
|
|
|
}
|
2020-07-30 00:20:39 +02:00
|
|
|
|
2020-07-27 09:21:35 +02:00
|
|
|
include "**/*.java"
|
|
|
|
}
|
|
|
|
|
2020-07-21 02:13:32 +02:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
test.compileClasspath += configurations.compileOnly
|
|
|
|
test.runtimeClasspath += configurations.compileOnly
|
2020-07-14 18:56:49 +02:00
|
|
|
}
|
2020-07-28 18:58:06 +02:00
|
|
|
|
|
|
|
publishing {
|
2020-07-28 19:47:28 +02:00
|
|
|
repositories {
|
|
|
|
maven {
|
2020-07-28 20:47:37 +02:00
|
|
|
if (version.contains("-DEV-")) {
|
|
|
|
url = uri("https://repo.extendedclip.com/content/repositories/dev/")
|
|
|
|
} else {
|
|
|
|
url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
|
|
|
}
|
2020-07-30 00:20:39 +02:00
|
|
|
|
2020-07-28 19:47:28 +02:00
|
|
|
credentials {
|
2020-07-28 20:06:51 +02:00
|
|
|
username = System.getenv("JENKINS_USER")
|
|
|
|
password = System.getenv("JENKINS_PASS")
|
2020-07-28 19:47:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-28 18:58:06 +02:00
|
|
|
publications {
|
2020-07-29 23:42:42 +02:00
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
from components.java
|
|
|
|
|
|
|
|
pom.withXml {
|
2020-07-30 00:20:39 +02:00
|
|
|
asNode().appendNode("packaging", "jar")
|
2020-07-29 23:42:42 +02:00
|
|
|
asNode().remove(asNode().get("dependencies"))
|
|
|
|
}
|
2020-07-28 18:58:06 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-28 19:47:28 +02:00
|
|
|
publish.dependsOn clean, test, jar
|