2018-07-31 22:12:41 +02:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
id 'com.github.johnrengelman.shadow' version '2.0.4'
|
2018-08-21 01:30:32 +02:00
|
|
|
id 'maven-publish'
|
|
|
|
}
|
|
|
|
|
|
|
|
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}"
|
2018-08-12 23:19:02 +02:00
|
|
|
compile 'net.kyori:text:1.12-1.6.4'
|
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}"
|
|
|
|
compile 'com.google.inject:guice:4.2.0'
|
|
|
|
compile 'org.checkerframework:checker-qual:2.5.4'
|
|
|
|
|
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
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
from components.java
|
|
|
|
|
|
|
|
artifact sourcesJar
|
|
|
|
artifact javadocJar
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-22 05:35:09 +02:00
|
|
|
if (System.getenv("MAVEN_DEPLOYMENT") != null && project.ext.getCurrentBranchName() == "master") {
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = 'myRepo'
|
|
|
|
if (project.version.toString().endsWith("-SNAPSHOT")) {
|
|
|
|
url = "file:///maven-repo/snapshots"
|
|
|
|
} else {
|
|
|
|
url = "file:///maven-repo/releases"
|
|
|
|
}
|
|
|
|
}
|
2018-08-21 01:30:32 +02:00
|
|
|
}
|
2018-08-22 05:35:09 +02:00
|
|
|
}
|
2018-08-21 01:30:32 +02:00
|
|
|
}
|