From c8435adb81af93bd3f855eda2ad41b5da8d547f6 Mon Sep 17 00:00:00 2001 From: Salvador Montiel Date: Mon, 24 Dec 2018 22:14:34 -0600 Subject: [PATCH 1/2] Add install instructions. Add JitPack badge. --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index c4b638b..15779e7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # dotenv +[![](https://jitpack.io/v/com.salvadormontiel/dotenv.svg)](https://jitpack.io/#com.salvadormontiel/dotenv) + **dotenv** is a Java library that loads environment variables from a `.env` file. Storing configuration in the environment separate from code is based on [The Twelve-Factor App](http://12factor.net/config) methodology. Environment variables listed in the host environment override those in `.env` file. @@ -8,6 +10,29 @@ Use `DotEnv.get("...")` instead of Java's `System.getenv("...")`. > Since Java does not provide a way to set environment variables on a currently running process, vars listed in `.env` cannot be set and thus cannot be retrieved using `System.getenv("...")`. +## Install + +**Step 1.** Add the JitPack repository to your build file + +Add it in your root `build.gradle` at the end of repositories: + +```groovy +allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } +} +``` + +**Step 2.** Add the dependency + +```groovy +dependencies { + implementation 'com.salvadormontiel:dotenv:0.0.1' +} +``` + ## Usage Create a `.env` file in the root directory of your project. Add From 2702763e9ed5545b0f456c6bd101f62e53b5149f Mon Sep 17 00:00:00 2001 From: Salvador Montiel Date: Mon, 24 Dec 2018 22:15:33 -0600 Subject: [PATCH 2/2] Update to version 0.0.2 --- README.md | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 15779e7..6394124 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ allprojects { ```groovy dependencies { - implementation 'com.salvadormontiel:dotenv:0.0.1' + implementation 'com.salvadormontiel:dotenv:0.0.2' } ``` diff --git a/build.gradle b/build.gradle index 76545ef..eac921d 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ group 'com.salvadormontiel' jar { baseName = 'dotenv' - version '0.0.1' + version '0.0.2' } sourceCompatibility = 1.8