2018-07-31 22:12:41 +02:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2018-08-21 01:30:32 +02:00
|
|
|
id 'maven-publish'
|
2018-10-28 04:45:35 +01:00
|
|
|
id 'checkstyle'
|
2019-04-24 20:36:49 +02:00
|
|
|
id "net.ltgt.errorprone" version "0.8"
|
2018-08-21 01:30:32 +02:00
|
|
|
}
|
|
|
|
|
2018-10-28 04:45:35 +01:00
|
|
|
apply from: '../gradle/checkstyle.gradle'
|
2019-04-24 20:36:49 +02:00
|
|
|
apply from: '../gradle/errorprone.gradle'
|
2019-03-29 02:46:45 +01:00
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
2018-10-28 02:45:42 +01:00
|
|
|
|
2018-08-21 01:30:32 +02:00
|
|
|
sourceSets {
|
|
|
|
ap {
|
|
|
|
compileClasspath += main.compileClasspath + main.output
|
|
|
|
}
|
2018-07-31 22:12:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile 'com.google.code.gson:gson:2.8.5'
|
2018-08-01 06:20:39 +02:00
|
|
|
compile "com.google.guava:guava:${guavaVersion}"
|
2019-05-07 03:44:55 +02:00
|
|
|
compile "net.kyori:text-api:${textVersion}"
|
|
|
|
compile "net.kyori:text-serializer-gson:${textVersion}"
|
|
|
|
compile "net.kyori:text-serializer-legacy:${textVersion}"
|
|
|
|
compile "net.kyori:text-serializer-plain:${textVersion}"
|
2018-07-31 22:12:41 +02:00
|
|
|
compile 'com.moandjiezana.toml:toml4j:0.7.2'
|
2018-08-21 01:30:32 +02:00
|
|
|
compile "org.slf4j:slf4j-api:${slf4jVersion}"
|
2020-06-27 05:40:48 +02:00
|
|
|
compile 'com.google.inject:guice:4.2.3'
|
2018-10-28 02:45:42 +01:00
|
|
|
compile "org.checkerframework:checker-qual:${checkerFrameworkVersion}"
|
2018-08-21 01:30:32 +02:00
|
|
|
|
2018-07-31 22:12:41 +02:00
|
|
|
testCompile "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
|
|
|
|
testCompile "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
|
2018-08-21 01:30:32 +02:00
|
|
|
from sourceSets.ap.output
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
from sourceSets.ap.output
|
|
|
|
}
|
|
|
|
|
|
|
|
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(
|
|
|
|
'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/',
|
2019-05-16 01:20:51 +02:00
|
|
|
'https://jd.kyori.net/text-api/3.0.0/',
|
2018-08-25 06:29:22 +02:00
|
|
|
'https://docs.oracle.com/javase/8/docs/api/'
|
|
|
|
)
|
|
|
|
|
|
|
|
// Disable the crazy super-strict doclint tool in Java 8
|
|
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
|
|
}
|
|
|
|
|
2018-08-21 01:30:32 +02:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
from components.java
|
|
|
|
|
|
|
|
artifact sourcesJar
|
|
|
|
artifact javadocJar
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-22 05:58:17 +02:00
|
|
|
repositories {
|
|
|
|
maven {
|
2020-07-04 09:19:38 +02:00
|
|
|
credentials {
|
2020-07-04 09:35:08 +02:00
|
|
|
username System.getenv("NEXUS_USERNAME")
|
|
|
|
password System.getenv("NEXUS_PASSWORD")
|
2020-07-04 09:19:38 +02:00
|
|
|
}
|
2020-07-04 09:35:08 +02:00
|
|
|
|
2020-07-04 09:19:38 +02:00
|
|
|
name = 'velocity-nexus'
|
|
|
|
def base = 'https://nexus.velocitypowered.com/repository/velocity-artifacts'
|
|
|
|
def releasesRepoUrl = "$base-releases/"
|
|
|
|
def snapshotsRepoUrl = "$base-snapshots/"
|
2018-08-22 05:58:17 +02:00
|
|
|
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
2018-08-21 01:30:32 +02:00
|
|
|
}
|
2018-08-22 05:35:09 +02:00
|
|
|
}
|
2019-01-21 18:12:27 +01:00
|
|
|
}
|