Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Apr 30, 2019 18:34

  1. Create a new file named build.gradle.

  2. Add the lines to the build gradle file that define the location of the plugin library and the dependency on the plugin:

    2a. To configure Gradle to automatically locate and download the plugin library add the following lines to build.gradle file:

    buildscript {
        repositories {
            jcenter()
            maven {
                url "https://repo1.perfectomobile.com/public/repositories/maven"
            }
        }
      
        dependencies {
            classpath "com.perfectomobile.instrumentedtest.gradleplugin:plugin:+"
        }
    }


    2b. If the plugin library is already downloaded to a folder (for example:libs sub-folder) add the following lines to build.gradle file:

    buildscript {
        repositories {
            jcenter()
      
            flatDir dirs: 'libs'
        }
      
        dependencies {
            classpath "com.perfectomobile.instrumentedtest.gradleplugin:plugin:+"
        }
    }
  3. Add the line that defines the plugin task 

    apply plugin: 'com.perfectomobile.instrumentedtest.gradleplugin'



  4. Add the plugin configuration settings - Lab authentication parameters
    1. Include the URL for the Perfecto Lab
    2. Your personal Security Token, generated for the Perfecto Lab

      perfectoGradleSettings {
          cloudURL "mobilecloud.perfectomobile.com"
          securityToken "AAABNg0ODAoPeNqtkT1PwzAQhnf/CkssM...JxQ3HEI8NsX02ff"
      }


      Note: You could also supply the configuration file location parameter in this gradle-file clause
      .


  • No labels