Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-26 16:12:50 +01:00
120 Zeilen
3.1 KiB
Groovy
120 Zeilen
3.1 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'checkstyle'
|
|
}
|
|
|
|
apply plugin: 'org.cadixdev.licenser'
|
|
apply from: '../gradle/checkstyle.gradle'
|
|
apply from: '../gradle/publish.gradle'
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
license {
|
|
header = project.file('HEADER.txt')
|
|
}
|
|
|
|
sourceSets {
|
|
ap {
|
|
compileClasspath += main.compileClasspath + main.output
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api 'com.google.code.gson:gson:2.8.8'
|
|
api "com.google.guava:guava:${guavaVersion}"
|
|
|
|
// DEPRECATED: Will be removed in Velocity Polymer
|
|
api 'com.moandjiezana.toml:toml4j:0.7.2'
|
|
|
|
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")
|
|
api("net.kyori:adventure-text-minimessage")
|
|
|
|
api "org.slf4j:slf4j-api:${slf4jVersion}"
|
|
api 'com.google.inject:guice:5.0.1'
|
|
api "org.checkerframework:checker-qual:${checkerFrameworkVersion}"
|
|
api 'com.velocitypowered:velocity-brigadier:1.0.0-SNAPSHOT'
|
|
|
|
api "org.spongepowered:configurate-hocon:${configurateVersion}"
|
|
api "org.spongepowered:configurate-yaml:${configurateVersion}"
|
|
api "org.spongepowered:configurate-gson:${configurateVersion}"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
|
|
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
classifier 'javadoc'
|
|
from javadoc
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier 'sources'
|
|
from sourceSets.main.allSource
|
|
from sourceSets.ap.output
|
|
}
|
|
|
|
jar {
|
|
from sourceSets.ap.output
|
|
manifest {
|
|
attributes 'Automatic-Module-Name': 'com.velocitypowered.api'
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
from sourceSets.ap.output
|
|
}
|
|
|
|
artifacts {
|
|
archives javadocJar
|
|
archives shadowJar
|
|
archives sourcesJar
|
|
}
|
|
|
|
javadoc {
|
|
options.encoding = 'UTF-8'
|
|
options.charSet = 'UTF-8'
|
|
options.source = '8'
|
|
options.links(
|
|
'http://www.slf4j.org/apidocs/',
|
|
'https://google.github.io/guava/releases/25.1-jre/api/docs/',
|
|
'https://google.github.io/guice/api-docs/5.0.1/javadoc/',
|
|
'https://docs.oracle.com/en/java/javase/11/docs/api//',
|
|
"https://jd.adventure.kyori.net/api/${adventureVersion}/"
|
|
)
|
|
|
|
// Disable the crazy super-strict doclint tool in Java 8
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
|
|
// Mark sources as Java 8 source compatible
|
|
options.source = '8'
|
|
|
|
// 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)
|
|
}
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
|
|
artifact sourcesJar
|
|
artifact javadocJar
|
|
}
|
|
}
|
|
}
|