geforkt von Mirrors/Velocity
dc48eb97f9
Note that this will remain internal API for Velocity and the publication of the module does not necessarily indicate that they will be stable.
118 Zeilen
3.3 KiB
Groovy
118 Zeilen
3.3 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'checkstyle'
|
|
}
|
|
|
|
apply from: '../gradle/checkstyle.gradle'
|
|
apply from: '../gradle/publish.gradle'
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
sourceSets {
|
|
ap {
|
|
compileClasspath += main.compileClasspath + main.output
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api 'com.google.code.gson:gson:2.8.6'
|
|
api "com.google.guava:guava:${guavaVersion}"
|
|
|
|
// DEPRECATED: Will be removed in Velocity 2.0.0
|
|
api "net.kyori:text-api:${textVersion}"
|
|
api "net.kyori:text-serializer-gson:${textVersion}"
|
|
api "net.kyori:text-serializer-legacy:${textVersion}"
|
|
api "net.kyori:text-serializer-plain:${textVersion}"
|
|
|
|
// DEPRECATED: Will be removed in Velocity 2.0.0
|
|
api 'com.moandjiezana.toml:toml4j:0.7.2'
|
|
|
|
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}"
|
|
api "net.kyori:adventure-text-serializer-legacy-text3:${adventureVersion}"
|
|
|
|
api "org.slf4j:slf4j-api:${slf4jVersion}"
|
|
api 'com.google.inject:guice:4.2.3'
|
|
api "org.checkerframework:checker-qual:${checkerFrameworkVersion}"
|
|
api 'com.mojang:brigadier:1.0.17'
|
|
|
|
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
|
|
}
|
|
|
|
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/4.2/javadoc/',
|
|
'https://jd.kyori.net/text-api/3.0.0/',
|
|
'https://docs.oracle.com/javase/8/docs/api/'
|
|
)
|
|
|
|
// 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'
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
|
|
artifact sourcesJar
|
|
artifact javadocJar
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
credentials {
|
|
username System.getenv("NEXUS_USERNAME")
|
|
password System.getenv("NEXUS_PASSWORD")
|
|
}
|
|
|
|
name = 'velocity-nexus'
|
|
def base = 'https://nexus.velocitypowered.com/repository/velocity-artifacts'
|
|
def releasesRepoUrl = "$base-releases/"
|
|
def snapshotsRepoUrl = "$base-snapshots/"
|
|
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
|
}
|
|
}
|
|
}
|