PlaceholderAPI/build.gradle
Andre_601 b4f6831e54
Update development from master (#662)
* Add contributing and expansion section

* Start using new Issue template system

* Create bug_report.yml

* Rename feature_request.md to feature_request_old.md

* Create feature_request.yml

* fix unique name

* Update feature_request_old.md

* Add Checkboxes

* Add checkboxes

* disable default issue body

* Delete bug_report_old.md

* Delete feature_request_old.md

* Rename bug_report_new.yml to bug_report.yml

* Check if deleting this fixed the PR...

* Use description in favour of about

* improve feature_request.md

* Update bug_report.yml

* Assign "Type: Issue (Unconfirmed)" label

* Use lists and not comma-separated string

* Update feature_request.yml

* Use id option for error and dump fields

* Add field for logs

* Remove deprecated issue_body type

* Update feature_request.yml

* Improve description of bug_report.yml

* Initial 1.17 Changes

* add render

* Revert build.gradle dependencies change

* Fixed duplicate files

* Initial test on adventure

* started moving to pure adventure

* finished kyori impl

* added 1.17 to nmsversion (what does this even do)

* removed dev for release

* added dev back

Co-authored-by: PiggyPiglet <PiggyPiglet@users.noreply.github.com>
Co-authored-by: darbyjack <admin@glaremasters.me>
Co-authored-by: PiggyPiglet <noreply@piggypiglet.me>
2021-07-11 01:37:09 +02:00

133 lines
3.4 KiB
Groovy

import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id "java"
id "maven-publish"
id "org.cadixdev.licenser" version "0.6.0"
id "com.github.johnrengelman.shadow" version "7.0.0"
}
group "me.clip"
version "2.10.10-DEV-${System.getProperty("BUILD_NUMBER")}"
description "An awesome placeholder provider!"
repositories {
maven({ url = "https://oss.sonatype.org/content/repositories/snapshots/" })
mavenCentral()
mavenLocal()
maven({ url = "https://repo.codemc.org/repository/maven-public" })
maven({ url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" })
}
dependencies {
implementation "org.bstats:bstats-bukkit:2.2.1"
implementation "net.kyori:adventure-platform-bukkit:4.0.0-SNAPSHOT"
compileOnly "org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT"
compileOnly "org.jetbrains:annotations:19.0.0"
testImplementation "org.openjdk.jmh:jmh-core:1.23"
testImplementation "org.openjdk.jmh:jmh-generator-annprocess:1.23"
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.6.2"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.6.2"
}
processResources {
filter ReplaceTokens, tokens: [name: rootProject.name, version: project.version.toString(), description: project.description]
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
tasks.withType(Javadoc) {
failOnError false
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}
shadowJar {
archiveClassifier.set("")
relocate "org.bstats", "me.clip.placeholderapi.metrics"
relocate "net.kyori", "me.clip.placeholderapi.libs.kyori"
}
license {
include '**/*.java'
matching('**/*.java') {
header = file('config/headers/main.txt')
}
ext {
year = 2021
}
}
test {
useJUnitPlatform()
}
configurations {
testImplementation {
extendsFrom(compileOnly)
}
}
publishing {
repositories {
maven {
if (version.contains("-DEV")) {
url = uri("https://repo.extendedclip.com/content/repositories/dev/")
} else {
url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
}
credentials {
username = System.getenv("JENKINS_USER")
password = System.getenv("JENKINS_PASS")
}
}
}
publications {
mavenJava(MavenPublication) {
artifactId = "placeholderapi"
from components.java
pom.withXml {
// some are having issues with bstats so we might need to add that to the pom as well
asNode().appendNode("packaging", "jar")
asNode().remove(asNode().get("dependencies"))
def dependenciesNode = asNode().appendNode("dependencies")
// jetbrains annotations
def jetbrainsAnnotations = dependenciesNode.appendNode("dependency")
jetbrainsAnnotations.appendNode("groupId", "org.jetbrains")
jetbrainsAnnotations.appendNode("artifactId", "annotations")
jetbrainsAnnotations.appendNode("version", "19.0.0")
}
}
}
}
publish.dependsOn clean, test, jar