2020-08-15 23:02:35 +02:00
|
|
|
plugins {
|
2020-10-30 16:00:16 +01:00
|
|
|
id("com.github.johnrengelman.shadow") version "6.1.0"
|
2020-11-20 16:38:30 +01:00
|
|
|
id("com.github.ben-manes.versions") version "0.36.0"
|
|
|
|
id("com.palantir.git-version") version "0.12.3"
|
2020-08-15 23:02:35 +02:00
|
|
|
application
|
2020-12-13 21:13:50 +01:00
|
|
|
kotlin("jvm") version "1.4.21"
|
2020-08-15 23:02:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2020-10-24 22:53:44 +02:00
|
|
|
mainClassName = "com.github.creeper123123321.viaaas.VIAaaSKt"
|
2020-08-15 23:02:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
2020-12-13 20:59:03 +01:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
|
|
targetCompatibility = JavaVersion.VERSION_11
|
2020-08-15 23:02:35 +02:00
|
|
|
}
|
|
|
|
|
2020-11-20 16:38:30 +01:00
|
|
|
val gitVersion: groovy.lang.Closure<String> by extra
|
|
|
|
|
2020-08-15 23:02:35 +02:00
|
|
|
group = "com.github.creeper123123321.viaaas"
|
2020-12-30 00:36:10 +01:00
|
|
|
version = "0.1.0-SNAPSHOT+" + try {
|
2020-11-20 16:38:30 +01:00
|
|
|
gitVersion()
|
|
|
|
} catch (e: Exception) {
|
|
|
|
"unknown"
|
|
|
|
}
|
|
|
|
|
2020-08-15 23:02:35 +02:00
|
|
|
extra.set("archivesBaseName", "VIAaaS")
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven("https://oss.sonatype.org/content/repositories/snapshots")
|
|
|
|
maven("https://repo.viaversion.com/")
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2020-12-13 20:59:03 +01:00
|
|
|
implementation("us.myles:viaversion:3.2.1") { isTransitive = false }
|
2020-12-02 00:00:08 +01:00
|
|
|
implementation("nl.matsv:viabackwards-all:3.2.0") { isTransitive = false }
|
|
|
|
implementation("de.gerrygames:viarewind-all:1.5.2") { isTransitive = false }
|
2021-01-17 14:45:41 +01:00
|
|
|
implementation("io.netty:netty-all:4.1.58.Final")
|
2020-11-07 01:35:40 +01:00
|
|
|
implementation("org.yaml:snakeyaml:1.26")
|
2020-12-02 00:00:08 +01:00
|
|
|
implementation("com.google.guava:guava:30.0-jre")
|
|
|
|
implementation("it.unimi.dsi:fastutil:8.4.4")
|
2020-10-30 16:00:16 +01:00
|
|
|
|
|
|
|
implementation("org.apache.logging.log4j:log4j-core:2.13.3")
|
|
|
|
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.13.3")
|
|
|
|
implementation("org.slf4j:slf4j-api:1.7.30")
|
|
|
|
implementation("net.minecrell:terminalconsoleappender:1.2.0")
|
|
|
|
implementation("org.jline:jline-terminal-jansi:3.12.1")
|
2020-09-20 17:43:26 +02:00
|
|
|
|
2020-12-30 00:44:42 +01:00
|
|
|
val ktorVersion = "1.5.0"
|
2020-09-20 17:43:26 +02:00
|
|
|
|
2020-10-30 16:00:16 +01:00
|
|
|
implementation(kotlin("stdlib-jdk8"))
|
2020-09-20 17:43:26 +02:00
|
|
|
implementation("io.ktor:ktor-network-tls-certificates:$ktorVersion")
|
|
|
|
implementation("io.ktor:ktor-server-netty:$ktorVersion")
|
2020-10-25 05:13:18 +01:00
|
|
|
implementation("io.ktor:ktor-client-cio:$ktorVersion")
|
|
|
|
implementation("io.ktor:ktor-client-gson:$ktorVersion")
|
2020-09-20 17:43:26 +02:00
|
|
|
implementation("io.ktor:ktor-websockets:$ktorVersion")
|
2020-10-24 22:53:44 +02:00
|
|
|
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion")
|
2020-08-15 23:02:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
val run: JavaExec by tasks
|
2020-10-30 16:00:16 +01:00
|
|
|
run.standardInput = System.`in`
|
|
|
|
|
|
|
|
project.configurations.implementation.get().isCanBeResolved = true
|
|
|
|
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
|
|
|
|
configurations = listOf(project.configurations.implementation.get())
|
|
|
|
transform(com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer::class.java)
|
|
|
|
}
|
|
|
|
build {
|
|
|
|
dependsOn(shadowJar)
|
2020-11-07 01:35:40 +01:00
|
|
|
dependsOn(named("dependencyUpdates"))
|
2020-10-30 16:00:16 +01:00
|
|
|
}
|
2020-11-06 19:57:56 +01:00
|
|
|
}
|
2020-11-20 16:38:30 +01:00
|
|
|
|
|
|
|
tasks.named<ProcessResources>("processResources") {
|
|
|
|
filesMatching("viaaas_info.json") {
|
|
|
|
filter<org.apache.tools.ant.filters.ReplaceTokens>("tokens" to mapOf(
|
|
|
|
"version" to project.property("version")
|
|
|
|
))
|
|
|
|
}
|
2020-12-02 00:00:08 +01:00
|
|
|
}
|
2020-12-13 20:59:03 +01:00
|
|
|
|
|
|
|
val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
|
|
|
|
|
2020-12-30 00:36:10 +01:00
|
|
|
compileKotlin.kotlinOptions.jvmTarget = "11"
|