2018-07-31 22:12:41 +02:00
|
|
|
plugins {
|
2020-08-22 01:09:04 +02:00
|
|
|
id 'java-library'
|
2018-08-21 01:30:32 +02:00
|
|
|
id 'maven-publish'
|
2018-10-28 04:45:35 +01:00
|
|
|
id 'checkstyle'
|
2018-08-21 01:30:32 +02:00
|
|
|
}
|
|
|
|
|
2021-03-31 22:04:06 +02:00
|
|
|
apply plugin: 'org.cadixdev.licenser'
|
2018-10-28 04:45:35 +01:00
|
|
|
apply from: '../gradle/checkstyle.gradle'
|
2020-09-23 07:03:18 +02:00
|
|
|
apply from: '../gradle/publish.gradle'
|
2019-03-29 02:46:45 +01:00
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
2018-10-28 02:45:42 +01:00
|
|
|
|
2020-11-07 00:52:00 +01:00
|
|
|
java {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
2021-03-31 22:04:06 +02:00
|
|
|
license {
|
|
|
|
header = project.file('HEADER.txt')
|
|
|
|
}
|
|
|
|
|
2018-08-21 01:30:32 +02:00
|
|
|
sourceSets {
|
|
|
|
ap {
|
|
|
|
compileClasspath += main.compileClasspath + main.output
|
|
|
|
}
|
2018-07-31 22:12:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-06-23 04:25:30 +02:00
|
|
|
api 'com.google.code.gson:gson:2.9.0'
|
2020-08-22 01:09:04 +02:00
|
|
|
api "com.google.guava:guava:${guavaVersion}"
|
2020-06-29 03:23:01 +02:00
|
|
|
|
2021-05-23 20:13:51 +02:00
|
|
|
// DEPRECATED: Will be removed in Velocity Polymer
|
2020-08-22 01:09:04 +02:00
|
|
|
api 'com.moandjiezana.toml:toml4j:0.7.2'
|
2020-06-29 05:25:09 +02:00
|
|
|
|
2020-12-07 02:50:57 +01:00
|
|
|
api(platform("net.kyori:adventure-bom:${adventureVersion}"))
|
|
|
|
api("net.kyori:adventure-api")
|
|
|
|
api("net.kyori:adventure-text-serializer-gson")
|
|
|
|
api("net.kyori:adventure-text-serializer-legacy")
|
|
|
|
api("net.kyori:adventure-text-serializer-plain")
|
2022-03-01 20:50:50 +01:00
|
|
|
api("net.kyori:adventure-text-minimessage")
|
2020-06-29 03:23:01 +02:00
|
|
|
|
2020-08-22 01:09:04 +02:00
|
|
|
api "org.slf4j:slf4j-api:${slf4jVersion}"
|
2021-05-23 23:20:52 +02:00
|
|
|
api 'com.google.inject:guice:5.0.1'
|
2020-08-22 01:09:04 +02:00
|
|
|
api "org.checkerframework:checker-qual:${checkerFrameworkVersion}"
|
2020-11-16 05:33:16 +01:00
|
|
|
api 'com.velocitypowered:velocity-brigadier:1.0.0-SNAPSHOT'
|
2018-08-21 01:30:32 +02:00
|
|
|
|
2020-08-22 01:09:04 +02:00
|
|
|
api "org.spongepowered:configurate-hocon:${configurateVersion}"
|
|
|
|
api "org.spongepowered:configurate-yaml:${configurateVersion}"
|
|
|
|
api "org.spongepowered:configurate-gson:${configurateVersion}"
|
2019-06-18 13:45:45 +02:00
|
|
|
|
2020-08-22 01:09:04 +02:00
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
|
2018-07-31 22:12:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task javadocJar(type: Jar) {
|
|
|
|
classifier 'javadoc'
|
|
|
|
from javadoc
|
|
|
|
}
|
|
|
|
|
|
|
|
task sourcesJar(type: Jar) {
|
|
|
|
classifier 'sources'
|
|
|
|
from sourceSets.main.allSource
|
2018-08-21 01:30:32 +02:00
|
|
|
from sourceSets.ap.output
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
from sourceSets.ap.output
|
2021-07-24 20:34:23 +02:00
|
|
|
manifest {
|
|
|
|
attributes 'Automatic-Module-Name': 'com.velocitypowered.api'
|
|
|
|
}
|
2018-08-21 01:30:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
from sourceSets.ap.output
|
2018-07-31 22:12:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives javadocJar
|
|
|
|
archives shadowJar
|
|
|
|
archives sourcesJar
|
2018-08-12 23:19:02 +02:00
|
|
|
}
|
2018-08-21 01:30:32 +02:00
|
|
|
|
2018-08-25 06:29:22 +02:00
|
|
|
javadoc {
|
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
options.charSet = 'UTF-8'
|
2020-04-23 22:19:49 +02:00
|
|
|
options.source = '8'
|
2018-08-25 06:29:22 +02:00
|
|
|
options.links(
|
2022-09-21 06:48:21 +02:00
|
|
|
'https://www.slf4j.org/apidocs/',
|
2022-12-10 01:45:04 +01:00
|
|
|
'https://guava.dev/releases/25.1-jre/api/docs/',
|
2021-05-23 23:20:52 +02:00
|
|
|
'https://google.github.io/guice/api-docs/5.0.1/javadoc/',
|
2021-05-23 23:21:44 +02:00
|
|
|
'https://docs.oracle.com/en/java/javase/11/docs/api//',
|
2021-10-15 14:18:11 +02:00
|
|
|
"https://jd.adventure.kyori.net/api/${adventureVersion}/"
|
2018-08-25 06:29:22 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// Disable the crazy super-strict doclint tool in Java 8
|
|
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
2020-12-19 23:43:17 +01:00
|
|
|
|
2019-10-04 23:09:41 +02:00
|
|
|
// Mark sources as Java 8 source compatible
|
|
|
|
options.source = '8'
|
2020-12-19 23:43:17 +01:00
|
|
|
|
|
|
|
// Remove 'undefined' from seach paths when generating javadoc for a non-modular project (JDK-8215291)
|
|
|
|
if (JavaVersion.current() >= JavaVersion.VERSION_1_9 && JavaVersion.current() < JavaVersion.VERSION_12) {
|
|
|
|
options.addBooleanOption('-no-module-directories', true)
|
|
|
|
}
|
2018-08-25 06:29:22 +02:00
|
|
|
}
|
|
|
|
|
2020-12-14 20:39:39 +01:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
2018-08-21 01:30:32 +02:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
from components.java
|
|
|
|
|
|
|
|
artifact sourcesJar
|
|
|
|
artifact javadocJar
|
|
|
|
}
|
|
|
|
}
|
2019-01-21 18:12:27 +01:00
|
|
|
}
|