Skip to content

Commit 2e17426

Browse files
committed
build(RunTerasology): allow task property to be initialized by injector
It requires this class to be abstract, but that seems to be the common practice.
1 parent c321da7 commit 2e17426

File tree

1 file changed

+4
-3
lines changed
  • build-logic/src/main/kotlin/org/terasology/gradology

1 file changed

+4
-3
lines changed

build-logic/src/main/kotlin/org/terasology/gradology/exec.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import org.gradle.api.plugins.JavaApplication
1010
import org.gradle.api.provider.Property
1111
import org.gradle.api.tasks.Input
1212
import org.gradle.api.tasks.JavaExec
13+
import org.gradle.api.tasks.Optional
1314
import org.gradle.api.tasks.SourceSetContainer
1415
import org.gradle.api.tasks.options.Option
1516
import org.gradle.kotlin.dsl.get
16-
import org.gradle.kotlin.dsl.property
1717
import org.gradle.kotlin.dsl.the
1818

1919
const val DEFAULT_MAX_HEAP_SIZE = "3G"
@@ -46,10 +46,11 @@ fun isMacOS() : Boolean {
4646
}
4747

4848

49-
open class RunTerasology : JavaExec() {
49+
abstract class RunTerasology : JavaExec() {
5050

51+
@get:Optional
5152
@get:Input
52-
val jmxPort: Property<Int> = objectFactory.property()
53+
abstract val jmxPort: Property<Int>
5354

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

0 commit comments

Comments
 (0)