3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00
Velocity/api/build.gradle

117 Zeilen
3.0 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'
2018-10-28 02:45:42 +01:00
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
license {
header = project.file('HEADER.txt')
}
sourceSets {
ap {
compileClasspath += main.compileClasspath + main.output
}
}
dependencies {
api 'com.google.code.gson:gson:2.8.6'
api "com.google.guava:guava:${guavaVersion}"
api "net.kyori:adventure-api:${adventureVersion}"
api "net.kyori:adventure-text-serializer-gson:${adventureVersion}"
api "net.kyori:adventure-text-serializer-legacy:${adventureVersion}"
api "net.kyori:adventure-text-serializer-plain:${adventureVersion}"
2020-11-06 13:32:33 +01:00
api("net.kyori:coffee:1.0.0-SNAPSHOT")
api "org.slf4j:slf4j-api:${slf4jVersion}"
2021-03-04 16:29:35 +01:00
api 'com.google.inject:guice:5.0.1'
api "org.checkerframework:checker-qual:${checkerFrameworkVersion}"
2020-11-16 05:33:16 +01:00
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}"
2019-06-18 13:45:45 +02:00
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
}
shadowJar {
from sourceSets.ap.output
}
artifacts {
archives javadocJar
archives shadowJar
archives sourcesJar
2018-08-12 23:19:02 +02:00
}
javadoc {
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
options.source = '8'
2020-12-02 07:39:04 +01:00
// options.links(
// 'https://www.slf4j.org/apidocs/',
// 'https://guava.dev/releases/30.0-jre/api/docs/',
// 'https://google.github.io/guice/api-docs/4.2/javadoc/',
// 'https://docs.oracle.com/javase/8/docs/api/',
// 'https://jd.adventure.kyori.net/api/4.0.0/'
// )
// 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()
}
test {
useJUnitPlatform()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}