Skip to content

Commit

Permalink
build(RunTerasology): allow task property to be initialized by injector
Browse files Browse the repository at this point in the history
It requires this class to be abstract, but that seems to be the common practice.
  • Loading branch information
keturn committed Dec 19, 2021
1 parent c321da7 commit 2e17426
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build-logic/src/main/kotlin/org/terasology/gradology/exec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import org.gradle.api.plugins.JavaApplication
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.JavaExec
import org.gradle.api.tasks.Optional
import org.gradle.api.tasks.SourceSetContainer
import org.gradle.api.tasks.options.Option
import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.property
import org.gradle.kotlin.dsl.the

const val DEFAULT_MAX_HEAP_SIZE = "3G"
Expand Down Expand Up @@ -46,10 +46,11 @@ fun isMacOS() : Boolean {
}


open class RunTerasology : JavaExec() {
abstract class RunTerasology : JavaExec() {

@get:Optional
@get:Input
val jmxPort: Property<Int> = objectFactory.property()
abstract val jmxPort: Property<Int>

@Option(option="jmx-port", description="Enable JMX connections on this port (jmxremote.port)")
fun parseJmxPort(value: String?) {
Expand Down

0 comments on commit 2e17426

Please sign in to comment.