From 6d6f394a1c82a55592a02d2fbd79b3e2f90ab414 Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Fri, 24 Sep 2021 15:50:01 +0200 Subject: [PATCH 1/2] Document download statistics badges --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index acea18e..4fad374 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,20 @@ If you are using a custom domain or BitBucket, use: (https://jitpack.io/#org.bitbucket.User/Repo) ``` -Or, if you prefer the flat-squared style: +For download statistics badges you can use: +- Weekly: + ``` + ![Weekly download statistics](https://jitpack.io/v/USER/REPO/week.svg) + ``` + ![Weekly download statistics](https://jitpack.io/v/jitpack/maven-simple/week.svg) +- Monthly: + ``` + ![Monthly download statistics](https://jitpack.io/v/USER/REPO/month.svg) + ``` + ![Monthly download statistics](https://jitpack.io/v/jitpack/maven-simple/month.svg) + + +If you prefer the flat-squared badge style you can append `?style=flat-square` to the URL: ``` https://jitpack.io/v/User/Repo.svg?style=flat-square From d25f9d81e43f46e3aac98c58ee7b090eed299eb5 Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Fri, 24 Sep 2021 15:52:20 +0200 Subject: [PATCH 2/2] Fix code block indentation --- README.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 4fad374..446240f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you are using Gradle to get a GitHub project into your build, you will need t **Step 1.** Add the JitPack maven repository to the list of repositories: ```gradle - url "https://jitpack.io" +url "https://jitpack.io" ``` **Step 2.** Add the dependency information: @@ -33,15 +33,15 @@ To see an example head to [jitpack.io](https://jitpack.io) and 'Look Up' a GitHu Gradle example: ```gradle - allprojects { - repositories { - jcenter() - maven { url "https://jitpack.io" } - } - } - dependencies { - implementation 'com.github.User:Repo:Version' - } +allprojects { + repositories { + jcenter() + maven { url "https://jitpack.io" } + } +} +dependencies { + implementation 'com.github.User:Repo:Version' +} ``` *Note*: when using multiple repositories in build.gradle it is recommended to add JitPack *at the end*. Gradle will go through all repositories in order until it finds a dependency. @@ -56,8 +56,8 @@ A snapshot is a version that has not been released. The difference between a rea For example: ```gradle - // dependency on the latest commit in the master branch - implementation 'com.github.jitpack:gradle-simple:master-SNAPSHOT' +// dependency on the latest commit in the master branch +implementation 'com.github.jitpack:gradle-simple:master-SNAPSHOT' ``` Adding `-SNAPSHOT` will build the latest commit on the master branch. @@ -87,8 +87,8 @@ In addition to snapshot builds JitPack supports building Pull Requests. Simply u For example: ```gradle - // dependency for Pull Request 4 - implementation 'com.github.jitpack:gradle-simple:PR4-SNAPSHOT' +// dependency for Pull Request 4 +implementation 'com.github.jitpack:gradle-simple:PR4-SNAPSHOT' ``` Publishing on JitPack @@ -107,13 +107,13 @@ As long as there's a build file in your repository and it can install your libra Add dependency information in your README. Tell the world where to get your library: ```gradle - repositories { - jcenter() - maven { url "https://jitpack.io" } - } - dependencies { - implementation 'com.github.jitpack:gradle-simple:1.0' - } +repositories { + jcenter() + maven { url "https://jitpack.io" } +} +dependencies { + implementation 'com.github.jitpack:gradle-simple:1.0' +} ``` - Add sources jar. Creating the sources jar makes it easier for others to use your code and contribute.