Does anyone know how to run gradle with arguments for threadedpoolservers?

Viewed 9

How do I go about specifying the amount of threads to run when I run this gradle command in terminal? my build.gradle file

task runTask3(type: JavaExec) {
  group 'server'
  description 'Creates Server socket waits for messages'

  classpath = sourceSets.main.runtimeClasspath

  main = 'taskone.ThreadPoolServer'
  standardInput = System.in
  
  // run with arguments e.g.: gradle runTask3 -Pport=9099 -q --console=plain
  if (project.hasProperty('port')) {
    args(project.getProperty('port'));
  }
}

enter image description here

0 Answers
Related