Configuration

Enforce Dev Tool Plugin

This is an open source plugin

Plugin Requirements

    • Java JDK 1.7
    • Gradle 2.0 or greater
    • Operation System:
      • Windows 7
      • Linux Ubuntu
      • Mac OS
    • build.gradle file
    • gradle.properties file (Optional)
    • credentials.dat file
    • User account in a Salesforce Organization and the corresponding security token

Tentative files configuration for User

Files Gradle

build.gradle
   buildscript {
       repositories {
           mavenCentral()
           jcenter()
       }
       dependencies {
           classpath 'org.fundacionjala.gradle.plugins.enforce:enforce-gradle-plugin:1.1.5'
       }
   }

   apply plugin: 'enforce'

   enforce {
       srcPath = 'src'
       deleteTemporaryFiles = true
   }
gradle.properties
    credentialId=myCustomId
credentials.dat
{
 "default": {
        "username": "user@org.com",
        "password": "mypassword",
        "token": "2B9UvHKK2E1ky1EkkYBPFvbLM",
        "sfdcType" : "login",
        "type": "ecrypted"
    }
}

Setup Salesforce organization credentials

Credential support

Managing of credentials can create and update credentials in 'credentials.dat' file which is located in HOME directory. A format was shown in Files gradle that is on the last point.

'AddCredential task' creates a credential in 'credentials.dat' file located in HOME directory it is saved as encrypted by default and its 'sfdcType' field is saved with a default login value.

'UpdateCredential task ' updates a credential by key from 'credentials.dat' file.

Note: Notice that the example uses the “default” key which by convention is the one to be used by default when a task is executed. You can have several entries to different salesforce accounts but each entry needs to have an unique key.

Project gradle tasks

The gradle project contains tasks that will help on development and packaging. You have to execute the gradle tasks from the project directory. It will show you all tasks runnable from the root project.

Command:

$ gradle tasks

Output:

Build Setup tasks

Credential Manager tasks

Deployment tasks

File Monitor tasks

Help tasks

Package Management tasks

Retrieve tasks

Test tasks

Utils tasks