Skip to content

Commit ffc0a80

Browse files
committed
Better installation instructions
1 parent 1bb4da0 commit ffc0a80

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

README.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
This Java module allows you to quickly and easily send emails through SendGrid using Java.
44

55
```java
6+
import com.github.scottmotte.sendgrid.Sendgrid;
7+
68
Sendgrid sendgrid = new Sendgrid("sendgrid_username", "sendgrid_password");
79

810
sendgrid.setTo("[email protected]");
@@ -16,11 +18,49 @@ sendgrid.send();
1618

1719
## Installation
1820

19-
### Using Gradle
21+
There are a number of ways to add this library to your Java project. I recommend using [Gradle](http://www.gradle.org).
22+
23+
#### via Gradle
24+
25+
Add the following to your build.gradle file in the root of your project.
26+
27+
```groovy
28+
...
29+
30+
repositories {
31+
mavenCentral()
32+
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
33+
name = 'GitHub'
34+
addArtifactPattern 'https://github.com/scottmotte/sendgrid-java/raw/master/repo/com/github/scottmotte/sendgrid/0.0.1/sendgrid-0.0.1-jar.jar'
35+
}
36+
}
37+
dependencies {
38+
...
39+
compile 'com.github.scottmotte:sendgrid:0.0.1'
40+
}
41+
42+
...
43+
```
44+
45+
Then import the library - in the file appropriate to your Java project.
2046

21-
I highly recommend [Gradle](http://www.gradle.org/) to manage your project's library dependencies.
47+
```java
48+
import com.github.scottmotte.sendgrid.Sendgrid;
49+
```
50+
51+
#### via copy/paste
52+
53+
Copy and paste the [SendGrid.java](https://github.com/scottmotte/sendgrid-java/blob/master/src/main/java/com/github/scottmotte/sendgrid/Sendgrid.java) file into your project. That file is available here: [https://github.com/scottmotte/sendgrid-java/blob/master/src/main/java/com/github/scottmotte/sendgrid/Sendgrid.java](https://github.com/scottmotte/sendgrid-java/blob/master/src/main/java/com/github/scottmotte/sendgrid/Sendgrid.java)
54+
55+
Then import the library - in the file appropriate to your Java project.
56+
57+
```java
58+
import com.github.scottmotte.sendgrid.Sendgrid;
59+
```
2260

61+
#### via Maven
2362

63+
I'd like to get this on Maven. Please [create an issue](https://github.com/scottmotte/sendgrid-java/issues/new) if you'd like to see it on Maven as well.
2464

2565
## Usage
2666

0 commit comments

Comments
 (0)