Skip to content
/ leap Public
forked from sundeepnanua/leap

Ant library of Salesforce development tasks

Notifications You must be signed in to change notification settings

cwdcwd/leap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leap: An Ant Library Plugin for Salesforce Apex Development

Project Goals

  • Accelerate the Apex learning and development process
  • Catalog Apex patterns and best practices in a template library
  • Enable continuous integration / Built around the Apex development lifecycle
  • Extensible and open

Overview

Leap is a Java Ant library that integrates with the Salesforce migration toolkit to help Developers with common tasks, such as generating trigger handlers and wrapper classes. The leap template library is an open source catalog of Apex best practices and examples, compiled from the Salesforce Development community, that encourages coding styles that work well on the Salesforce platform.

Usage

From the command line of any Salesforce development environment:
	~/ant leapTargetName

List of Leap Tasks

  • leapsfields: Generates a class of static fields for all SObjects
  • leaptriggers: Generates triggers and Apex trigger handler class(es) for SObjects
  • leapwrappers: Generates wrapper class(es) (in development)

Getting started

  • Download and copy bin/ant-leap.jar into the local Ant library folder (on a Mac this is located at /usr/share/ant/lib).
  • Create build.properties and build.xml files within the root of any Salesforce development project (see example templates below).
  • Enter Salesforce development credentials into build.properties.
  • To test, type "ant leapsfields" to run the leap task that builds a class of field names.

Example build.properties

	# build.properties
	#
	# For server URL properties...
	# Use 'https://login.salesforce.com' for production or developer edition.
	# Use 'https://test.salesforce.com for sandbox.
# Specify the login credentials for the Salesforce development organization
sf.dev.username = [email protected]
sf.dev.password = password
sf.dev.url = https://login.salesforce.com

# Specify the login credentials for the Salesforce staging/test organization
sf.test.username = 
sf.test.password = 
sf.test.url = https://login.salesforce.com

# Specify the login credentials for the Salesforce production/packaging organization
sf.prod.username = 
sf.prod.password = 
sf.prod.url = https://login.salesforce.com

Example build.xml

<project name="Project Name" default="test" basedir="." xmlns:sf="antlib:com.salesforce" xmlns:leap="antlib:org.leap">
	<target name="leapTaskName">
		<leap:leapTaskName username="${sf.dev.username}" password="${sf.dev.password}" serverurl="${sf.dev.url}" />
	</target>

	<target name="leapsfields">
		<leap:leapsfields username="${sf.dev.username}" password="${sf.dev.password}" token="${sf.dev.token}" serverurl="${sf.dev.url}" />
	</target>

	<target name="leaptriggers">
		<leap:leaptriggers username="${sf.dev.username}" password="${sf.dev.password}" token="${sf.dev.token}" serverurl="${sf.dev.url}" />
	</target>

	<target name="leapwrappers">
		<leap:leapwrappers username="${sf.dev.username}" password="${sf.dev.password}" token="${sf.dev.token}" serverurl="${sf.dev.url}" />
	</target>
	
	<target name="leapmetadiff">
		<leap:leapmetadiff srcFolder="${sf.dev.srcFolder}" destFolder="${sf.prod.srcFolder}" outFolder="${sf.outFolder}"  username="${sf.dev.username}" password="${sf.dev.password}" token="${sf.dev.token}" serverurl="${sf.dev.url}"/>
	</target>		
</project>

About

Ant library of Salesforce development tasks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 94.8%
  • Apex 4.7%
  • Shell 0.5%