Fixed the gradle run task

This commit is contained in:
Josh Larson
2022-08-21 14:19:20 -05:00
parent 5a2da3fbb8
commit e9e524949f
+12 -11
View File
@@ -91,26 +91,27 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class).configure
destinationDirectory.set(File(destinationDirectory.get().asFile.path.replace("kotlin", "java")))
}
tasks.getByName("run") {
this as JavaExec
tasks.create<JavaExec>("runDevelopment") {
dependsOn(tasks.getByName("test"))
enableAssertions = true
classpath = sourceSets.main.get().runtimeClasspath
mainClass.set("com.projectswg.holocore.ProjectSWG")
if (holocoreLogLevel != null)
args = listOf("--log-level", holocoreLogLevel!!)
}
tasks.create<JavaExec>("runProduction") {
classpath = sourceSets.main.get().runtimeClasspath
mainClass.set("com.projectswg.holocore.ProjectSWG")
if (holocoreLogLevel != null)
args = listOf("--log-level", holocoreLogLevel!!)
}
tasks.create<JavaExec>("runProduction") {
this as JavaExec
classpath = sourceSets.main.get().runtimeClasspath
mainClass.set("com.projectswg.holocore.ProjectSWG")
if (holocoreLogLevel != null)
args = listOf("--log-level", holocoreLogLevel!!)
tasks.replace("run", JavaExec::class).apply {
dependsOn(tasks.getByName("runDevelopment"))
}
tasks.create<JavaExec>("runClientdataConversion") {