Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions on using JitPack to import dependency #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,43 @@ Add this dependency to your project's build file:
}
```

### Using JitPack
[JitPack](https://jitpack.io/) allows you to use a git repository as a source of dependencies in your build file.

First add jitpack as a repository in your build file. Then import the dependency using the GitHub user and repository names.

#### Maven
```xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependency>
<groupId>com.github.OneSignal</groupId>
<artifactId>onesignal-java-api</artifactId>
<version>main-SNAPSHOT</version>
</dependency>
```

#### Gradle
```groovy

repositories {
// ...
maven { url 'https://jitpack.io' }
}

dependencies {
implementation 'com.github.OneSignal:onesignal-java-api:main-SNAPSHOT'
}

```

You can replace `main-SNAPSHOT` with a specific commit's short hash to use that commit.

### Others

At first generate the JAR by executing:
Expand Down