2021-02-18 06:32:43 +01:00
|
|
|
import net.kyori.indra.IndraPlugin
|
|
|
|
import net.kyori.indra.IndraPublishingPlugin
|
|
|
|
import net.kyori.indra.sonatypeSnapshots
|
2021-02-17 14:49:10 +01:00
|
|
|
|
|
|
|
plugins {
|
|
|
|
`java-library`
|
2021-02-18 06:32:43 +01:00
|
|
|
id("net.kyori.indra")
|
2021-02-17 14:49:10 +01:00
|
|
|
}
|
|
|
|
|
2021-02-18 06:32:43 +01:00
|
|
|
group = "us.myles"
|
|
|
|
version = "3.3.0-21w06a"
|
|
|
|
description = "Allow newer clients to join older server versions."
|
2021-02-17 14:49:10 +01:00
|
|
|
|
2021-02-18 06:32:43 +01:00
|
|
|
subprojects {
|
|
|
|
apply<JavaLibraryPlugin>()
|
|
|
|
apply<MavenPublishPlugin>()
|
|
|
|
apply<IndraPlugin>()
|
|
|
|
apply<IndraPublishingPlugin>()
|
2021-02-17 14:49:10 +01:00
|
|
|
|
|
|
|
tasks {
|
|
|
|
// Variable replacements
|
|
|
|
processResources {
|
|
|
|
filesMatching(listOf("plugin.yml", "mcmod.info", "fabric.mod.json", "bungee.yml")) {
|
|
|
|
expand("version" to project.version, "description" to project.description)
|
|
|
|
}
|
|
|
|
}
|
2021-02-18 06:32:43 +01:00
|
|
|
}
|
2021-02-17 14:49:10 +01:00
|
|
|
|
2021-02-18 06:32:43 +01:00
|
|
|
val platforms = listOf(
|
|
|
|
"bukkit",
|
|
|
|
"bungee",
|
|
|
|
"fabric",
|
|
|
|
"sponge",
|
|
|
|
"velocity"
|
|
|
|
).map { "viaversion-$it" }
|
|
|
|
if (platforms.contains(project.name)) {
|
|
|
|
configureShadowJar()
|
2021-02-17 14:49:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
2021-02-18 06:32:43 +01:00
|
|
|
sonatypeSnapshots()
|
|
|
|
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots")
|
|
|
|
maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/")
|
|
|
|
maven("https://repo.spongepowered.org/maven")
|
|
|
|
maven("https://repo.viaversion.com")
|
|
|
|
maven("https://libraries.minecraft.net")
|
|
|
|
maven("https://repo.maven.apache.org/maven2/")
|
2021-02-17 14:49:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-02-18 06:32:43 +01:00
|
|
|
testImplementation("io.netty", "netty-all", Versions.netty)
|
|
|
|
testImplementation("com.google.guava", "guava", Versions.guava)
|
|
|
|
testImplementation("org.junit.jupiter", "junit-jupiter-api", Versions.jUnit)
|
|
|
|
testImplementation("org.junit.jupiter", "junit-jupiter-engine", Versions.jUnit)
|
2021-02-17 14:49:10 +01:00
|
|
|
}
|
|
|
|
|
2021-02-18 06:32:43 +01:00
|
|
|
indra {
|
|
|
|
javaVersions {
|
|
|
|
target.set(8)
|
|
|
|
testWith(8, 11, 15)
|
|
|
|
}
|
|
|
|
github("ViaVersion", "ViaVersion") {
|
|
|
|
issues = true
|
|
|
|
}
|
|
|
|
mitLicense()
|
2021-02-17 14:49:10 +01:00
|
|
|
}
|
2021-02-18 06:32:43 +01:00
|
|
|
}
|
2021-02-17 14:49:10 +01:00
|
|
|
|
2021-02-18 06:32:43 +01:00
|
|
|
tasks {
|
|
|
|
// root project has no useful artifacts
|
|
|
|
withType<Jar> {
|
|
|
|
onlyIf { false }
|
2021-02-17 14:49:10 +01:00
|
|
|
}
|
2021-02-18 06:32:43 +01:00
|
|
|
}
|