80 lines
2.3 KiB
Plaintext
80 lines
2.3 KiB
Plaintext
|
plugins {
|
||
|
java
|
||
|
`java-library`
|
||
|
}
|
||
|
|
||
|
repositories {
|
||
|
mavenCentral()
|
||
|
gradlePluginPortal()
|
||
|
maven(url = "https://libraries.minecraft.net")
|
||
|
maven(url = "https://oss.sonatype.org/content/groups/public")
|
||
|
maven(url = "https://hub.spigotmc.org/nexus/content/groups/public")
|
||
|
}
|
||
|
|
||
|
java {
|
||
|
withSourcesJar()
|
||
|
withJavadocJar()
|
||
|
}
|
||
|
|
||
|
group = "com.elevatemc.espigot"
|
||
|
version = "1.8.8-R0.1-SNAPSHOT"
|
||
|
|
||
|
dependencies {
|
||
|
java {
|
||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||
|
}
|
||
|
|
||
|
api("commons-lang:commons-lang:2.6")
|
||
|
api("org.avaje:ebean:2.8.1")
|
||
|
api("com.googlecode.json-simple:json-simple:1.1.1")
|
||
|
api("org.yaml:snakeyaml:1.30")
|
||
|
api("net.md-5:bungeecord-chat:1.8-SNAPSHOT")
|
||
|
compileOnlyApi("net.sf.trove4j:trove4j:3.0.3") // provided by server
|
||
|
|
||
|
// bundled with Minecraft, should be kept in sync
|
||
|
api("com.google.guava:guava:17.0")
|
||
|
api("com.google.code.gson:gson:2.2.4")
|
||
|
|
||
|
// testing
|
||
|
testImplementation("junit:junit:4.12")
|
||
|
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||
|
testImplementation("net.sf.trove4j:trove4j:3.0.3") // required by tests
|
||
|
}
|
||
|
|
||
|
tasks {
|
||
|
val generateApiVersioningFile by registering {
|
||
|
inputs.property("version", project.version)
|
||
|
val pomProps = layout.buildDirectory.file("pom.properties")
|
||
|
outputs.file(pomProps)
|
||
|
doLast {
|
||
|
pomProps.get().asFile.writeText("version=${project.version}")
|
||
|
}
|
||
|
}
|
||
|
|
||
|
jar {
|
||
|
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
|
||
|
into("META-INF/maven/${project.group}/${project.name.toLowerCase()}")
|
||
|
}
|
||
|
|
||
|
manifest {
|
||
|
attributes(
|
||
|
"Automatic-Module-Name" to "org.bukkit"
|
||
|
)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
withType<Javadoc> {
|
||
|
(options as StandardJavadocDocletOptions).let {
|
||
|
// hide warnings
|
||
|
it.addStringOption("Xdoclint:none", "-quiet")
|
||
|
|
||
|
it.links(
|
||
|
"https://guava.dev/releases/21.0/api/docs/",
|
||
|
"https://javadoc.io/doc/org.yaml/snakeyaml/1.28/",
|
||
|
"https://javadoc.io/doc/org.jetbrains/annotations-java5/21.0.1/",
|
||
|
"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
||
|
)
|
||
|
}
|
||
|
}
|
||
|
}
|