Skip to content

Commit c2bd2ac

Browse files
JAVA-3738 update README
1 parent fbd2923 commit c2bd2ac

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

gradle-plugin/README.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,46 @@ To publish this plugin to your mavenLocal apply the `maven-publish` plugin to th
1515
./gradlew publishToMavenLocal
1616
```
1717

18-
## Coniguration
18+
## Configuration
19+
This plugin is configured via the `contrastConfiguration` block in your projects `gradle.build` script
20+
```shell
21+
contrastConfiguration{
22+
username = '<username>'
23+
apiKey = '<apiKey>'
24+
serviceKey = '<serviceKey>'
25+
apiUrl = '<apiUrl>'
26+
orgUuid = '<orgUuid>'
27+
appName = '<appName>'
28+
serverName = '<serverName>'
29+
appVersion = '<appVersion>'
30+
jarPath = "<path.to.local.agent.jar>"
31+
}
32+
```
33+
34+
### AppName
35+
If no app name is configured the plugin will use the gradle project's name instead
36+
37+
### AppVersion
38+
TODO: If no version is provided, the plugin will generate one based on the current Travis build number
39+
1940
Attaching the Java agent with this plugin relies on your API credentials being set in the following env variables:
41+
42+
43+
## Developement
44+
### Testing
45+
In order to run the plugin's end-to-end tests, you must configure these variables in your environment
2046
```shell
2147
export CONTRAST__API__URL=https://app.contrastsecurity.com/Contrast/api
2248
export CONTRAST__API__USER_NAME=<your-user-name>
2349
export CONTRAST__API__API_KEY=<your-api-key>
2450
export CONTRAST__API__SERVICE_KEY=<your-service-key>
2551
export CONTRAST__API__ORGANIZATION_ID=<your-organization-id>
2652
```
53+
TODO: have end-to-end tests be turned off unless a certain property is enabled
54+
55+
56+
57+
## Tasks
58+
The `installAgent` task takes in your configuration as defined by the `contrastConfiguration` block and attaches the java agent to all Test tasks for your project.
59+
If no Agent is provided, the plugin will attempt to download the current Java Agent available on TeamServer, at the endpoint provided in the configuration.
60+

0 commit comments

Comments
 (0)