2021-02-17 17:50:47 +01:00
|
|
|
dependencies {
|
2021-04-14 14:16:48 +02:00
|
|
|
api(projects.viaversionApi)
|
2023-12-26 23:38:02 +01:00
|
|
|
api(rootProject.libs.text) {
|
|
|
|
exclude("com.google.code.gson", "gson")
|
|
|
|
}
|
2023-11-06 04:11:35 +01:00
|
|
|
|
|
|
|
// Note: If manually starting tests doesn't work for you in IJ, change 'Gradle -> Run Tests Using' to 'IntelliJ IDEA'
|
|
|
|
testImplementation(rootProject.libs.netty)
|
|
|
|
testImplementation(rootProject.libs.guava)
|
2024-08-05 09:30:34 +02:00
|
|
|
testImplementation(rootProject.libs.snakeYaml)
|
2023-11-06 04:11:35 +01:00
|
|
|
testImplementation(rootProject.libs.bundles.junit)
|
2021-02-17 17:50:47 +01:00
|
|
|
}
|
2021-05-25 08:25:00 +02:00
|
|
|
|
|
|
|
java {
|
|
|
|
withJavadocJar()
|
|
|
|
}
|
2023-11-06 11:04:45 +01:00
|
|
|
|
|
|
|
tasks.named<Jar>("sourcesJar") {
|
|
|
|
from(project(":viaversion-api").sourceSets.main.get().allSource)
|
|
|
|
}
|
2024-10-29 14:00:55 +01:00
|
|
|
|
|
|
|
// Task to quickly test/debug code changes using ViaProxy
|
|
|
|
tasks.register<JavaExec>("runViaProxy") {
|
|
|
|
dependsOn(tasks.shadowJar)
|
|
|
|
|
|
|
|
val viaProxyConfiguration = configurations.create("viaProxy")
|
|
|
|
viaProxyConfiguration.dependencies.add(dependencies.create(rootProject.libs.viaProxy.get().copy().setTransitive(false)))
|
|
|
|
|
|
|
|
mainClass.set("net.raphimc.viaproxy.ViaProxy")
|
|
|
|
classpath = viaProxyConfiguration
|
|
|
|
workingDir = file("run")
|
|
|
|
|
|
|
|
doFirst {
|
|
|
|
val jarsDir = file("$workingDir/jars")
|
|
|
|
jarsDir.mkdirs()
|
|
|
|
file("$jarsDir/${project.name}.jar").writeBytes(tasks.shadowJar.get().archiveFile.get().asFile.readBytes())
|
|
|
|
}
|
|
|
|
|
|
|
|
doLast {
|
|
|
|
file("$workingDir/jars/${project.name}.jar").delete()
|
|
|
|
file("$workingDir/logs").deleteRecursively()
|
|
|
|
}
|
|
|
|
}
|