From 1bb5a56e18d51b0be44a546f889355405bcfcb6c Mon Sep 17 00:00:00 2001 From: Wajdi Almir Date: Sat, 3 Sep 2022 15:46:51 +0200 Subject: [PATCH] Instructions on using JitPack to import dependency Added instruction for how to use JitPack to import the repo as a dependency directly. Provided maven and gradle examples. --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index 05efec8..7670f3b 100644 --- a/README.md +++ b/README.md @@ -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 + + + jitpack.io + https://jitpack.io + + + + + com.github.OneSignal + onesignal-java-api + main-SNAPSHOT + +``` + +#### 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: