title: jenkins how to run from jenkins gradle specify testng.xml
body: <p>I'm working with jenkins and try to call a remote machine that has a java project with gradle config to run tests build.gradle
  version '1.0-SNAPSHOT'</p>
  
  <pre><code>apply plugin: 'idea'
  apply plugin: 'java'
  apply plugin: 'eclipse'
  apply plugin: 'maven-publish'
  
  sourceCompatibility = 1.8
  version = '1.0'
  
  
  sourceSets {
      jars
  }
  
  repositories {
      jcenter()
      mavenCentral()
  }
  
  dependencies {
      compile fileTree(dir: "src/jars/resources", include: ['*.jar'])
      compile group: 'org.testng', name: 'testng', version: '6.9.10'
      compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '3.+'
      compile group: 'io.appium', name: 'java-client', version: '4.1.2'
      compile 'com.testdroid:testdroid-api:2.9'
      compile group: 'org.json', name: 'json', version: '20141113'
  }
  
  compileJava {
      options.encoding = "UTF-8"
  }
  
  test {
      useTestNG {
          suites 'src/main/resources/testng.xml'
      }
  }
  </code></pre>
  
  <p>but I want to run a custom testng2.xml! so I define in jenkins a parameter test and define their testng2.xml, but and it will show in the console </p>
  
  <pre><code>/Users/jenkins/Home/workspace/AutomationGradle/gradlew -Dtest=testng2.xml  clean test -i
  </code></pre>
  
  <p>but I can't understand how to make gradle to get the dynamic parameter</p>