Skip to content

Commit

Permalink
Update to version 0.0.2
Browse files Browse the repository at this point in the history
Merge branch 'release/0.0.2'
  • Loading branch information
SMontiel committed Dec 25, 2018
2 parents d469d7f + 2702763 commit 8bc72ce
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.2'
}
```

## Usage

Create a `.env` file in the root directory of your project. Add
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ group 'com.salvadormontiel'

jar {
baseName = 'dotenv'
version '0.0.1'
version '0.0.2'
}

sourceCompatibility = 1.8
Expand Down

0 comments on commit 8bc72ce

Please sign in to comment.