Added Gradle section.

This commit is contained in:
Erik C. Thauvin 2020-06-09 21:15:16 -07:00
parent b9cd08cff3
commit c835e8a478

View file

@ -1,4 +1,4 @@
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause)
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![release](https://img.shields.io/github/release/ethauvin/isgd-shorten.svg)](https://github.com/ethauvin/isgd-shorten/releases/latest) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/isgd-shorten/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/isgd-shorten) [![Download](https://api.bintray.com/packages/ethauvin/maven/isgd-shorten/images/download.svg)](https://bintray.com/ethauvin/maven/isgd-shorten/_latestVersion) \
[![Known Vulnerabilities](https://snyk.io/test/github/ethauvin/isgd-shorten/badge.svg?targetFile=pom.xml)](https://snyk.io/test/github/ethauvin/isgd-shorten?targetFile=pom.xml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_isgd-shorten&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_isgd-shorten) [![Build Status](https://travis-ci.com/ethauvin/isgd-shorten.svg?branch=master)](https://travis-ci.com/ethauvin/isgd-shorten) [![CircleCI](https://circleci.com/gh/ethauvin/isgd-shorten/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/isgd-shorten/tree/master)
# [is.gd](https://is.gd/developers.php) Shortener for Kotlin/Java
@ -46,10 +46,23 @@ returns:
```json
test({ "shorturl": "https://is.gd/foobar" });
```
### Gradle
To use with [Gradle](https://gradle.org/), include the following dependency in your [build](https://github.com/ethauvin/isgd-shorten/blob/master/examples/build.gradle.kts) file:
```gradle
repositories {
jcenter()
}
dependencies {
implementation("net.thauvin.erik:isgd-shorten:0.9.1")
}
```
### v.gd
Additionally, link can be shorten using v.gd by setting the `isVgd` flag:
Additionally, link can be shortened using [v.gd](https://v.gd/) by setting the `isVgd` flag:
```kotlin
Isgd.shorten("https://www.example.com/", isVgd = true) // returns https://v.gd/2z2ncj